dindex.comp {survcomp} | R Documentation

## Function to compare two D indices

### Description

This function compares two D indices from their betas and standard errors as computed by a Cox model for instance. The statistical test is a Student t test for dependent samples. The two D indices must be computed using the `D.index` function from the same survival data.

### Usage

    dindex.comp(dindex1, dindex2)

### Arguments

`dindex1` | first D index
`dindex2` | second D index

### Details

The two D indices must be computed using the `D.index` function from the same samples (and corresponding survival data). The function uses a Student t test for dependent samples.

### Value

`p.value` | p-value from the Wilcoxon rank sum test for the comparison dindex1 > dindex2
`dindex1` | value of the first D index
`dindex2` | value of the second D index

### Author(s)

Benjamin Haibe-Kains

### References

Haibe-Kains, B. and Desmedt, C. and Sotiriou, C. and Bontempi, G. (2008) "A comparative study of survival models for breast cancer prognostication based on microarray data: does a single gene beat them all?", Bioinformatics, 24, 19, pages 2200–2208.

### See Also

`D.index`, `t.test`

### Examples

    set.seed(12345)
    age <- rnorm(100, 50, 10)
    size <- rexp(100,1)
    stime <- rexp(100)
    cens <- runif(100,.5,2)
    sevent <- as.numeric(stime <= cens)
    stime <- pmin(stime, cens)
    d1 <- D.index(x=age, surv.time=stime, surv.event=sevent)
    d2 <- D.index(x=size, surv.time=stime, surv.event=sevent)
    dindex.comp(d1, d2)

[Package survcomp version 1.42.0 Index]