Skip to contents

A pair (i, j) is comparable only if subject i had an event and either t_i < t_j, or the two times are equal and j also had an event. The index is (concordant + 0.5 tied) / comparable, with higher risk score meaning shorter expected survival. Harrell's version weights every comparable pair equally and is therefore dependent on the censoring distribution; Uno's version reweights each pair by the inverse squared censoring survival and truncates at the 75th percentile of the event times, which removes that dependence.

Usage

Cstat(time, event, risk_score, method = "harrell")

Arguments

time

Observed event or censoring times.

event

Event indicator, 1 = event, 0 = censored.

risk_score

Predicted risk; higher means shorter survival.

method

Either "harrell" (default) or "uno".

Value

List with c_statistic, se, ci_lower, ci_upper, concordant, discordant, tied, comparable.

Details

R arm of the existing Python cstat module.

References

Harrell, F. E. et al. (1982). JAMA 247(18):2543-2546. doi:10.1001/jama.1982.03320430047030 Uno, H. et al. (2011). Statistics in Medicine 30(10):1105-1117. doi:10.1002/sim.4154

Examples

Cstat(c(1, 2, 3, 4), c(1, 1, 1, 0), c(4, 3, 2, 1))
#> $c_statistic
#> [1] 1
#> 
#> $se
#> [1] 0
#> 
#> $ci_lower
#> [1] 1
#> 
#> $ci_upper
#> [1] 1
#> 
#> $concordant
#> [1] 6
#> 
#> $discordant
#> [1] 0
#> 
#> $tied
#> [1] 0
#> 
#> $comparable
#> [1] 6
#>