[R] How to calculate the Deviance for test data based on a Cox model

Terry Therneau therneau at mayo.edu
Fri Mar 30 15:18:13 CEST 2012


<kevinchiang865 at hotmail.com> wrote:
 >
 >
 > Dear List,
 >
 > If I got a Cox model based on training set, then how should I 
calculate the Cox log partial likelihood for the test data?
 > Actually I am trying to calculate the deviance on test dataset to 
evaluate the performance of prediction model, the equation is as 
follows: D = -2{L(test)[beta_train] - L(test)[0]}. It means using the 
beta coefficients got from training set to calculate the likelihood of 
test data. I know I can got log likelihood for training model, but how 
to get it for test data?

----------
   If you are attending the ENAR meeting next week, go find Cindy 
Crowson's poster which has a very nice discussion of how to evaluate a 
prior Cox model on new data.  Given the timeline for statistics 
journals, her draft paper (sitting on my desk) might yet be years away 
from print even if reviewers like it.

Terry T.



More information about the R-help mailing list