[R] c-index validation from Design library

Frank E Harrell Jr f.harrell at vanderbilt.edu
Fri Jul 17 23:21:16 CEST 2009


Juliet Hannah wrote:
> Hi Group,
> 
> I have a question about obtaining the bias-corrected c-index using
> validate from the Design library.
> 
> As an example, consider the example from help page:
> 
> library(Design)
> ?validate.lrm
> 
> n <- 1000
> age            <- rnorm(n, 50, 10)
> blood.pressure <- rnorm(n, 120, 15)
> cholesterol    <- rnorm(n, 200, 25)
> sex            <- factor(sample(c('female','male'), n,TRUE))
> 
> 
> L <- .4*(sex=='male') + .045*(age-50) + (log(cholesterol -
> 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))
> 
> y <- ifelse(runif(n) < plogis(L), 1, 0)
> 
> f <- lrm(y ~ sex*rcs(cholesterol)+pol(age,2)+blood.pressure, x=TRUE, y=TRUE)
> 
> validate(f, B=100)
> 
> The output does not include c, but it does include Dxy. The bias
> corrected Dxy = 0.280.
> 
> Is it correct for me to say that the bias corrected c-index is:
> 0.280/2 + 0.5 = 0.64?

As long as you use the relationship Dxy = 2*(C-.5) you are fine.

> 
> Also, I have seen this described as the c-index, which is a
> generalization of the c-statistic. Is there
> a difference? I thought both of these quantities refer to the area
> under the ROC.

With censored data or continuous responses you don't have an ROC curve, 
so this is a generalization of AUC.

Frank

> 
> Thanks!
> 
> Juliet
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list