[R] exact method in coxph

Terry Therneau therneau at mayo.edu
Thu Jan 17 15:52:57 CET 2008


> The help says that the exact method is computationally demanding, but even
> after days the computing it won't finish. Also, if I include a frailty-term,
> the exact method gives me results in no time. Is my setup incorrect?

  Assume that at some particular time point there are k deaths and n subjects at 
risk.  The exact partial likelihood calculation for that time point involves an 
average of k choose n terms.  This gets very big very fast.  For instance 20 
events on day x among 100 subjects involves 100!/(20! 80!) > 5e20 terms.  I 
stopped ever using the exact likelihood when I realized
  	- a particular coxph model was taking a long time, so I did a "back of 
the envelope" approximation and realized that the expected compute time was 
several years
  	- for all the cases that were small enough to finish, the Efron 
approximation was very close.
  	

  When there are penalized terms such as pspline() or frailty() the code only 
chooses between the Breslow and Efron approximations.  The code should have 
issued an error message when you specified the exact method -- this is an 
oversight that I will fix.  Since the relevant line of code in coxpenal.fit is
  	if (method=='efron')
your frailty fit was done using the Breslow approximation.

	Terry Therneau




More information about the R-help mailing list