[R] Explaining Survival difference between Stata and R

Thomas Lumley tlumley at u.washington.edu
Thu May 13 16:35:17 CEST 2004


On Thu, 13 May 2004, Paul Johnson wrote:

>
> I still don't quite understand your point about the reason that coxph
> crashes.  Why does the difference of scale between the variables cause
> trouble?

Because exp(beta*x) is very, very, large for many values of beta when x
is that large. If exp(beta*x) ever becomes Inf the computations will
break down.

A better approach than scaling the x would be to update the step-halving
code to handle infinities, because scaling doesn't necessarily fix the
problem (though it does here), and has possible bad effects in masking a
singular design matrix (as Peter Dalgaard pointed out).


	-thomas




More information about the R-help mailing list