R2-type Coefficients for Cox proportional hazards models
Details
The OXS
, Nagelk
and XO
functions implement three types
of R2 coefficients for right-censored time-to-event data: (a) The
coefficient proposed by O'Quigley et al. (2005) (OXS
), (b) the
coefficient proposed by Nagelkerke (1991) (Nagelk
) and (c) the
coefficient proposed by Xu and O'Quigley (1999) (XO
).
Because the OXS
, Nagelk
and XO
functions assume that
lp
and lpnew
were derived from a correctly specified Cox
proportional hazards model, estimates obtained from these functions are only
valid if the Cox model holds.
References
Nagelkerke, N. J. D. (1991).
A note on a general definition of the
coefficient of determination.
Biometrika 78, 691–692.
O'Quigley, J., R. Xu, and J. Stare (2005).
Explained randomness in
proportional hazards models.
Statistics in Medicine 24,
479–489.
Xu, R. and J. O'Quigley (1999).
A measure of dependence for proportional
hazards models.
Journal of Nonparametric Statistics 12,
83–107.
Examples
data(cancer,package="survival")
TR <- ovarian[1:16,]
TE <- ovarian[17:26,]
train.fit <- survival::coxph(survival::Surv(futime, fustat) ~ age,
x=TRUE, y=TRUE, method="breslow", data=TR)
model0 <- survival::coxph(survival::Surv(futime, fustat)~1, data=TR)
model1 <- survival::coxph(survival::Surv(futime, fustat)~age, data=TR)
f0 <- rep(0,nrow(TE))
f1 <- predict(model1, newdata=TE)
Surv.res <- survival::Surv(TE$futime, TE$fustat)
OXS(Surv.res, f1, f0)
#> [1] 0.4973804
Nagelk(Surv.res, f1, f0)
#> [1] 0.2939943
XO(Surv.res, f1, f0)
#> [1] 0.329469