concordance.index {survcomp}R Documentation

Function to compute the concordance index for survival or binary class prediction

Description

Function to compute the concordance index for a risk prediction, i.e. the probability that, for a pair of randomly chosen comparable samples, the sample with the higher risk prediction will experienced an event before the other sample or belongs to a higher binary class.

Usage

concordance.index(x, surv.time, surv.event, cl, weights, strat, alpha = 0.05, outx = TRUE, method = c("conservative", "noether", "nam"), na.rm = FALSE)

Arguments

x a vector of risk predictions.
surv.time a vector of event times.
surv.event a vector of event occurence indicators.
cl a vector of binary class indicators.
weights weight of each sample.
strat stratification indicator.
alpha apha level to compute confidence interval.
outx set to TRUE to not count pairs of observations tied on x as a relevant pair. This results in a Goodman-Kruskal gamma type rank correlation.
method can take the value conservative, noether or name (see paper Pencina et al. for details).
na.rm TRUE if missing values should be removed.

Details

Method name is not implemented yet.

Value

c.index concordance index estimate.
se standard error of the estimate.
lower lower bound for the confidence interval.
upper upper bound for the confidence interval.
p.value p-value for the statistical test if the estimate if different from 0.5.
n number of samples used for the estimation.
data list of data used to compute the index (x, surv.time and surv.event, or cl).

Author(s)

Benjamin Haibe-Kains

References

Harrel Jr, F. E. and Lee, K. L. and Mark, D. B. (1996) "Tutorial in biostatistics: multivariable prognostic models: issues in developing models, evaluating assumptions and adequacy, and measuring and reducing error", Statistics in Medicine, 15, pages 361–387.

Pencina, M. J. and D'Agostino, R. B. (2004) "Overall C as a measure of discrimination in survival analysis: model specific population value and confidence interval estimation", Statistics in Medicine, 23, pages 2109–2123, 2004.

See Also

rcorr.cens

Examples

set.seed(12345)
age <- rnorm(100, 50, 10)
sex <- sample(0:1, 100, replace=TRUE)
stime <- rexp(100)
cens   <- runif(100,.5,2)
sevent  <- as.numeric(stime <= cens)
stime <- pmin(stime, cens)
strat <- sample(1:3, 100, replace=TRUE)
cat("survival prediction:\n")
concordance.index(x=age, surv.time=stime, surv.event=sevent, strat=strat, method="noether")
cat("binary class prediction:\n")
concordance.index(x=age, cl=sex, strat=strat, method="noether")

[Package survcomp version 1.0 Index]