cindex.categorization <-
function (x, y) {
	if (!survival::is.Surv(y))
		y <- survival::Surv(y)

	i <- is.na(x) | is.na(y)
	if (any(i)) {
		x <- x[!i]
		y <- y[!i, ]
	}
	k <- survival::concordancefit(y, x)$count
	cindex <- (k[2] + (k[3]+k[4]+k[5])/2)/sum(k[1:5])
	cindex
}
