[R] ran out of iteration in coxph

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Feb 5 17:01:18 CET 2007


It is quite possible that you are trying to find an MPLE where none 
exists, in which case non-convergence is a good thing.

Using only 300 cases for 188 or 215 variables is asking a lot, especially 
when 26% of them are only partially observed. Since you did not sign your 
message we have no idea of your background, but it looks like the problem 
here is with statistical expectations and not R usage.

On Sun, 4 Feb 2007, carol white wrote:

> hi,
> I applied coxph to my matrix of 300 samples and 215 variables and got the following error
>
> Error in fitter(X, Y, strats, offset, init, control, weights = weights,  :
>        NA/NaN/Inf in foreign function call (arg 6)
> In addition: Warning message:
> Ran out of iterations and did not converge in: fitter(X, Y, strats, offset, init, control, weights = weights,
>
> 26% of time data is censored and here is the result of density of the matrix
>
>       x                y
> Min.   :-6.943   Min.   :-5.258e-18
> 1st Qu.:-4.086   1st Qu.: 2.341e-04
> Median :-1.228   Median : 4.584e-03
> Mean   :-1.228   Mean   : 8.740e-02
> 3rd Qu.: 1.630   3rd Qu.: 5.857e-02
> Max.   :      4.487   Max.   : 7.099e-01
> ------------------------------------------------------------------------------
> in another trial of the same matrix, the number of var is reduced to 188. the variables were normalized (mean = 0 and standard dev = 1 for each variable) and here is the result of density
>       x                 y
> Min.   :-8.1532   Min.   :4.571e-16
> 1st Qu.:-4.3334   1st Qu.:1.043e-04
> Median :-0.5136   Median :1.102e-03
> Mean   :-0.5136   Mean   :6.538e-02
> 3rd Qu.: 3.3062   3rd Qu.:5.373e-02
> Max.   : 7.1260   Max.   :4.337e-01
>
> I get still the warning
> Warning message:
> Ran out of iterations and did not converge in: fitter(X, Y, strats, offset,  init,     control, weights = weights,
> but not error in fitter ....
>
> the number of iterations is 20 and didn't converge. saw from coefficient values and their p-value
>
> Why do I get this message?
>
> Look forward to your reply
>
> carol
>
> ---------------------------------
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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



More information about the R-help mailing list