[R] Error in using coxph()

Thomas Lumley tlumley at u.washington.edu
Mon May 17 00:38:36 CEST 2004


On Sun, 16 May 2004, Siew Leng TENG wrote:

> Hi,
>
> I am getting errors of the following kind. I can't
> seem to point the source of the error. I would greatly
> appreciate any advice.

In addition to things other people have pointed out, you didn't actually
set any of the control parameters you were trying to set.  As the output
shows, you set the data= argument to coxph.control(iter.max=1e10,
eps=1e-3), rather than the control= argument.

	-thomas


>
> Many thanks and good day,
> -Melinda
>
>
> Error message :
> ----------------
> "Ran out of iterations and did not converge in:
> fitter(X, Y, strats, offset, init, control, weights =
> weights,..."
>
> Details :
> ---------
> E is a vector of survival times (or censored times),
> 1-F is a vector of '0's, and cov is a matrix of 1
> column. There are altogether 75 observations.
>
> Tried :
> ------
> P <- try(surv.cox <- coxph(Surv(E, 1-F) ~ cov,
> coxph.control(iter.max=1e10, eps = 1e-03)))
>
> Output (from above command) :
> -----------------------------
> Call:
> coxph(formula = Surv(E, F) ~ cov, data =
> coxph.control(iter.max = 1e+10,
>     eps = 0.001))
>
>
>       coef exp(coef) se(coef)     z     p
> cov -0.233     0.793     0.11 -2.11 0.035
>
> Likelihood ratio test=4.51  on 1 df, p=0.0336  n= 75
>
>
> Machine Specs :
> ----------------
> Unix/ Windows XP
> R-1.8.1
> Survival package
>
>
>
>
>
> __________________________________
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list