Skip to content
Prev 164668 / 398503 Next

Concordance Index - interpretation

K F Pearce wrote:
Since Frank Harrell hasn't replied I'll contribute my 2 cents.
The c-index is a generalisation of the area under the ROC curve (AUC), 
therefore it measures how well your model discriminates between 
different responses, i.e., is your predicted response low for low 
observed responses and high for high observed responses. So C > 0.5 
implies a good prediction ability, C = 0.5 implies no predictive ability 
(no better than random guessing), and C < 0.5 implies "good" 
anti-prediction (worse than random, but if you flip the prediction 
direction it becomes a good prediction).
Both the predictor and the actual response can be either continuous or 
categorical, as long as they are ordinal (since it's a rank-based method).

I don't know about the outx part.
I think the explanation in Harrell 1996, Section 5.5 is pretty clear, 
but perhaps could've used some pseudocode. Anyway, I understand it as:

1) Create all pairs of observed responses.
2) For all valid response pairs, i.e., pairs where one response y_1 is 
greater than the other y_2, test whether the corresponding predictions 
are concordant, i.e, yhat_1 > yhat_2. If so add 1 to the running sum s. 
If yhat_1 = yhat_2, add 0.5 to the sum. Count the number n of valid 
response pairs.
3) Divide the total sum s by the number of valid response pairs n.

Here's my simple attempt, unoptimised and doesn't handle censoring:

# yhat: predicted response
# y: observed response
concordance <- function(yhat, y)
{
    s <- 0
    n <- 0
    for(i in seq(along=y))
    {
       for(j in seq(along=y))
       {
	 if(i != j)
	 {
	    if(y[i] > y[j])
	    {
	       s <- s + (yhat[i] > yhat[j]) + 0.5 * (yhat[i] == yhat[j])
	       n <- n + 1
	    }
	 }
       }
    }
    s / n
}

See also Harrell's 2001 book "Regression Modeling Strategies", and for 
the special case of binary outcomes (which is the AUC), Hanley and 
McNeil (1982) "The Meaning and Use of the Area under a Receiver 
Operating Characteristic (ROC) Curve", Radiology 143:29--36.

Cheers,
Gad
Message-ID: <4943A864.8070600@csse.unimelb.edu.au>
In-Reply-To: <EMEW-kBBAA0af5d34fa7b2a5b27bc4ffc0d9eba23d2-4165CF7A7F12DE4B96622CCBB90586470A344699@largo.campus.ncl.ac.uk>