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. 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 __________________________________
Note you said you used 1-F but the output said you used F. You also say `1-F is a vector of '0's' so I think you may have declared that all observations are right-censored. (NB if you give Surv an event vector of all 1's it is ambiguous, so don't do this.) If you did declare all observations as censored, then it seems the coxph algorithm does not cope (although I did not try to run it for 1e10 iterations). That's really an undetected user error, as there is no information in the partial likelihood about the coefficient (and no recorded events). On Sun, 16 May 2004, Siew Leng TENG wrote:> 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.Please read the posting guide and try to avoid us having to guess what you actually did.> 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-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
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