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,
    method.test = c("logrank", "likelihood.ratio", "wald"), na.rm = FALSE, ...)

### Arguments

`x` | a vector of risk predictions.
`surv.time` | a vector of event times.
`surv.event` | a vector of event occurrence indicators.
`weights` | weight of each sample.
`strat` | stratification indicator.
`alpha` | apha level to compute confidence interval.
`method.test` | Statistical test to use in order to compute the p-values related to a D. index, see summary.coxph for more details.
`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.

Note that the value D reported in (Royston and Sauerbrei, 2004) is given

### Value

`d.index` | D index (exponentiated, aka hazard ratio).
`coef` | D index estimate (coefficient) fitted in the cox regression model.
`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)
    weight <- runif(100, min=0, max=1)
    D.index(x=age, surv.time=stime, surv.event=sevent, weights=weight, strat=strat)

[Package survcomp version 1.40.0 Index]