Compute Royston's D for a Cox model
Compute the D statistic and R^2 for a coxph model, proposed by Royston and Sauerbrei
royston(fit, newdata, ties = TRUE, adjust = FALSE)
fit |
a coxph fit |
newdata |
optional validation data set |
ties |
make a correction for ties in the risk score |
adjust |
adjust for possible overfitting |
The adjustment is based on the ratio r= (number of events)/(number of coefficients). For models which have sufficient sample size (r>20) the adjustment will be small.
a vector containing the value of D, R^2_D and the estimated standard error of D.
P. Royston and W. Sauerbrei, A new measure of prognostic separation in survival data. Statistics in Medicine 23:723-748, 2004.
# one of the examples from the paper pbc2 <- na.omit(pbc) # no missing values cfit <- coxph(Surv(time, status==2) ~ age + log(bili) + edema + albumin + stage + copper, data=pbc2, ties="breslow") royston(cfit)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.