# How to evaluate the goodness of fit for survial functions

I am a newcomer to survival analysis, although I have some knowledge in classification and regression.

For regression, we have MSE and R square statistics. But how we can say that survival model A is superior to survival model B besides some kind of graphical plots (K-M curve)?

If possible, please explain the difference with an example (e.g., rpart package in R). How can you show that one CART survival tree is better than another CART survival tree? What metrics can be used?

• There are a variety of kinds of survival analysis. Some of them are indeed based on regression. Some of them, like the K-M, might be more easily thought of as estimators for survival-related statistics. Sep 24, 2014 at 1:14
• Thank you for your continued efforts to improve your question. I suspect it is answerable / appropriate for CV now. I have nominated it for reopening. We'll see if others agree. It might help if you could post two CART-type survival models for people to use in explaining these issues. Sep 25, 2014 at 2:04
• Ben, So basically you're saying that in a Cox Proportional Hazard Regression, there is (so far) no good way to evaluate the goodness of fit? R-Square does not lead to good results because it can not handle censored observations and uncensored observations correctly? You're talking about Harrells c, did I understood you right that method is not applyable to a Cox-PH Regression? Oct 17, 2017 at 7:52

The main problem with statistics like the Cox model $R^2$ (described in another answer) is that it's very dependent on the censorship distribution of your data. Other natural things you might look at, such as the likelihood ratio to the null model, also have this problem. (This is basically because the contribution of a censored datapoint to the likelihood is very different from the contribution of a datapoint where the event is observed, because one of them comes from a PDF and one of them comes from a CDF.) Various researchers have proposed ways to get around this, but the ones I've seen usually require you to have a model of the censorship distribution or something equally impractical. I haven't looked into how bad this dependence is in practice, so if your censoring is fairly mild, you could still look into likelihood-ratio-based statistics. For survival CART models, you can always look at the actual likelihood ratio they give over, say, the Kaplan-Meier estimate of the hazard function.

For generic survival models, one frequently-used statistic is Harrell's c index, an analog of Kendall's $\tau$ or the ROC AUC for survival models. Essentially, c is the proportion, out of all instances where you know that one instance experienced an event later than the other, that the model ranks correctly. (In other words, for a pair of instances to be included in the denominator here, at most one can be censored, and it must be censored after the other one experienced an event.) The c index also depends on the censorship distribution, but according to Harrell the dependence is milder than for the other statistics I mentioned above. Unfortunately, Harrell's c is also less sensitive than the above statistics, so you may not want to choose between models based on it if the difference between them is small; it's more useful as an interpretable index of general performance than a way to compare different models.

(Lastly, of course if you have a specific purpose in mind for the models--that is, if you know what your prediction loss function is--you can always evaluate them according to the loss function! But I'm guessing you're not so lucky...)

For a more in-depth discussion of both likelihood-ratio statistics and Harrell's c, you should look at Harrell's excellent textbook Regression Modeling Strategies. The section on evaluating survival models is §19.10, pp. 492-493. I'm sorry I can't give you a single definitive answer, but I don't think this is a solved problem!

Cox proportional hazards regressions for survival data can be thought of as corresponding to standard regressions in many respects. For example, Cox regressions also provide residual standard errors and R-square statistics. See the coxph function in the R survival package. (You can think of K-M curves as corresponding to non-parametric analyses in standard statistics. How would you incorporate a non-parametric test into CART?) In practice with clinical data, residual standard errors tend to be high and R-square values low in Cox regression.

Thus standard regressions and Cox regressions have similar requirements and limitations. You have to verify that that the data fit the underlying assumptions, which in Cox analysis further includes the assumption that hazards being compared are proportional over time. You will still have to avoid over-fitting and you will have to validate your model. And as I understand CART, although I don't use it myself, you will still face the difficulties posed by comparing non-nested models.

• Thanks for your answer on the difference and relations between Cox regression and regression. But I do want to know how to compare two rpart(CART) decision tree survival models. Sep 30, 2014 at 8:38
• The open-access paper linked at projecteuclid.org/euclid.ssu/1315833185 is a fairly recent review and comparison of methods for building and choosing survival trees, based on rpart and other R packages and code.
– EdM
Sep 30, 2014 at 14:46
• Thanks for poining out the paper. I will read the paper right now. Oct 8, 2014 at 2:19