What is the $R^2$ value given in the summary of a coxph model in R?
Rsquare= 0.186 (max possible= 0.991 )
I foolishly included it a manuscript as an $R^2$ value and the reviewer jumped on it saying he wasn’t aware of an analogue of the $R^2$ statistic from the classic linear regression being developed for the Cox model and if there was one please provide a reference. Any help would be great!
getS3method("summary","coxph") you can look at how it is calculated.
The relevant code lines are the following:
logtest <- -2 * (cox$loglik - cox$loglik) rval$rsq <- c(rsq = 1 - exp(-logtest/cox$n), maxrsq = 1 - exp(2 * cox$loglik/cox$n))
cox$loglik is “a vector of length 2 containing the log-likelihood with the initial values and with the final values of the coefficients” (see
cox$n is “number of observations used in the fit”.