Skip to contents

Evaluate a fitted model's predictions at one or more horizons: the concordance index (discrimination) and the inverse-probability-of-censoring-weighted Brier score with its index of prediction accuracy (calibration and accuracy against a covariate-free Kaplan-Meier reference).

Usage

sest_score(fit, data, times)

Arguments

fit

A sest_fit of kind "parametric", "spline", "cure", "cox" or "nonparametric" with a right-censored survival::Surv(time, status) response. Other kinds are refused.

data

A data frame carrying the response and covariates to score on (in-sample if it is the training data, out-of-sample otherwise).

times

Numeric horizons at which to score.

Value

A data frame with time, cindex (Harrell's C using predicted risk at that horizon), brier (IPCW Brier) and ipa (index of prediction accuracy). Under proportional hazards the order of the predicted risks is the same at every horizon, so a Cox fit has one C-index for all times.

Details

The inverse-probability-of-censoring-weighted Brier score at horizon \(t\) is $$BS(t) = \frac{1}{n}\sum_{i=1}^n \Big[ \frac{\big(0 - \hat S(t \mid x_i)\big)^2}{\hat G(T_i)} \mathbf{1}(T_i \le t, \delta_i = 1) + \frac{\big(1 - \hat S(t \mid x_i)\big)^2}{\hat G(t)} \mathbf{1}(T_i > t) \Big]$$ where \(\hat S(\cdot \mid x_i)\) is the predicted survival probability, \(\hat G\) is the Kaplan-Meier estimator of the censoring survival function, and the index of prediction accuracy is \(IPA(t) = 1 - BS(t) / BS_0(t)\) against a covariate-free reference \(BS_0\).

References

Graf E, Schmoor C, Sauerbrei W, Schumacher M. Assessment and comparison of prognostic classification schemes for survival data. Statistics in Medicine 1999; 18(17-18): 2529-2545. doi:10.1002/(SICI)1097-0258(19990915/30)18:17/18<2529::AID-SIM274>3.0.CO;2-5

See also

Examples

fit <- survestimand(survival::Surv(time, status) ~ age + sex, survival::lung,
               method = "cox")
sest_score(fit, survival::lung, times = c(200, 400, 600))
#>   time   cindex     brier        ipa
#> 1  200 0.602853 0.2094573 0.03698539
#> 2  400 0.602853 0.2319303 0.01233122
#> 3  600 0.602853 0.1647980 0.01887124