[R] Cox model convergence
Terry Therneau
therneau at mayo.edu
Mon Feb 18 20:29:05 CET 2013
On 02/16/2013 05:00 AM, r-help-request at r-project.org wrote:
> Then I perform cox regression as follows
> m2_1<-coxph(Surv(X_t0,X_t, vlsupp) ~ nvp + as.factor(cd4pccat) +
> as.factor(vlcat) + as.factor(agecat) + as.factor(whostage) +
> as.factor(hfacat) + as.factor(wfacat) + as.factor(wfhcat) +
> as.factor(resistance) + as.factor(postrantb) +
> cluster(id),data=myimp$imputations[[1]],method="breslow",robust=TRUE)
> summary(m2_1)
> The I get the following eWarning message:
> In fitter(X, Y, strats, offset, init, control, weights = weights, :
> Ran out of iterations and did not converge
Failure to converge is highly unusual for coxph unless the model is near singular. A good
rule for Cox models is to have 10-20 events for each coefficient. When models get below
2 events/coef the results can be unreliable, both numerically and biologically, and some
version of a shrinkage model is called for. What are the counts for your data set?
A vector of inital values, if supplied, needs to be of the same length as the
coefficients. Make it the same length and in the same order as the printed coefficients
from your run that did not converge.
Terry Therneau
More information about the R-help
mailing list