[R] variance explained in a cox ph model
Terry Therneau
therneau at mayo.edu
Wed Feb 22 15:01:52 CET 2012
--- begin included message ---
I have a left truncated, right censored cox model:
coxph(Surv(start, stop, censor) ~ x + y, mydata)
I would like to know how much of the observed variance (as a number
between 0 and 1) is explained by each variable. How could I do that?
Adding terms sequentially and then using anova(mod1, mod2) tells me
whether I get a significant improvement of the fit, but does not tell me
how much variance I actually explain?
--------- end inclusion --------
There is not a "variance explained" in a Cox model, since it does not
try to predict the actual survival time. There are several proposals in
the literature for an "approximate" R^2. If you use summary(fit) it
will print one of the older ideas, which unfortuantely was shown by
later literature to not be a very good approach (replacing this is
another item on my long list of "someday fix"). At present your best
choice is to use the c-statistic, which is also printed out by summary.
Terry Therneau
More information about the R-help
mailing list