D.index {survcomp}R Documentation

Function to compute the D index

Description

Function to compute the D index for a risk prediction, i.e. an estimate of the log hazard ratio comparing two equal-sized prognostic groups. This is a natural measure of separation between two independent survival distributions under the proportional hazards assumption.

Usage

D.index(x, surv.time, surv.event, weights, strat, alpha = 0.05, 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.
weights weight of each sample.
strat stratification indicator.
alpha apha level to compute confidence interval.
na.rm TRUE if missing values should be removed.
... additional parameters to be passed to the coxph function.

Details

The D index is computed using the Cox model fitted on the scaled rankits of the risk scores instead of the risk scores themselves. The scaled rankits are the expected standard Normal order statistics scaled by kappa = sqrt(8/pi). See (Royston and Sauerbrei, 2004) for details.

Value

d.index D 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.
coxm coxph.object fitted on the survival data and z (see below).
data list of data used to compute the index (x, z, surv.time and surv.event). The item z contains the scaled rankits which are the expected standard Normal order statistics scaled by kappa.

Author(s)

Benjamin Haibe-Kains

References

Royston, P. and Sauerbrei, W. (2004) "A new measure of prognostic separation in survival data", Statistics in Medicine, 23, pages 723–748.

See Also

coxph, coxph.object, normOrder

Examples

set.seed(12345)
age <- rnorm(100, 50, 10)
stime <- rexp(100)
cens   <- runif(100,.5,2)
sevent  <- as.numeric(stime <= cens)
stime <- pmin(stime, cens)
strat <- sample(1:3, 100, replace=TRUE)
D.index(x=age, surv.time=stime, surv.event=sevent, strat=strat)

[Package survcomp version 1.0 Index]