[R] unexpected "false convergence"
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jan 4 16:17:45 CET 2006
nlme in 2.2.x uses a different optimizer (nlminb) from that used earlier
(optim). The author (Douglas Bates) believes it to be better, but my
experience is rather the opposite.
For some reason he choose not to give you the option via lmeControl of
selecting one or the other. I also cannot find any announcement of the
change in the package itself (other than the ChangeLog).
On Wed, 4 Jan 2006, Jack Tanner wrote:
> Thank you, Spencer.
> I've discovered that if I drop the value parameter from the call to
> corSymm(), R 2.2.1 converges successfully, but the values it converges to
> are slighly (in the hundredths and thousandths) different from those that R
> 2.1.1 produces.
> In the same vein, I also have an example where the R 2.2.1 glmmPQL produces
> the warning "non-integer #successes in a binomial glm! in: eval(expr, envir,
> enclos)", and another where R 2.2.1 says "iteration limit reached without
> convergence" unless I invoke glmmPQL() with lmeControl(msMaxIter=100).
> Neither of those happen in R 2.1.1.
> I'm fine with the results above. I don't know if they're of interest to
> anyone else; if they are, I'm happy to provide more details.
>> From: Spencer Graves <spencer.graves at pdf.com>
>> To: Jack Tanner <ihok at hotmail.com>
>> CC: r-help at stat.math.ethz.ch, Douglas Bates <dmbates at gmail.com>,
>> Prof Brian Ripley <ripley at stats.ox.ac.uk>
>> Subject: Re: [R] unexpected "false convergence"
>> Date: Tue, 03 Jan 2006 20:40:56 -0800
>> I replicated your 'false convergence' using R 2.2.0:
>> R version 2.2.0, 2005-10-06, i386-pc-mingw32
>> attached base packages:
>>  "methods" "stats" "graphics" "grDevices" "utils" "datasets"
>>  "base"
>> other attached packages:
>> nlme MASS
>> "3.1-66" "7.2-23"
>> Since the error message said, "Error in lme.formula", I listed the code
>> for "lme.formula" and traced it using "debug(lme.formula)", The function
>> "glmmPQL" calls "lme.formula" repeatedly. The function "lme.formula" in
>> turn calls "nlminb" when it's available, though it used to call "optim".
>> The fifth time "lme.formula" was called, "nlminb" returned the error
>> message "false convergence (8)".
>> Under R 2.2, "nlminb" is part of the "base" package. I'm not certain,
>> but I don't think it was available in "base" under R 2.1.1.
>> I think this explains the problem, but not how to fix it. I tried
>> modifying the code fo "lme.formula" to force it to call "optim", but this
>> generated a different error. I am therefore copying Professors Bates &
>> Ripley in case one of them might want to look at this.
>> hope this helps.
>> spencer graves
>> Jack Tanner wrote:
>>> I've come into some code that produces different results under R 2.1.1 and
>>> R 2.2.1. I'm really unfamiliar with the libraries in question (MASS and
>>> nlme), so I don't know if this is a bug in my code, or a regression in R.
>>> If it's a bug on my end, I'd appreciate any advice on potential causes and
>>> relevant documentation.
>>> The code:
>>> The output under R 2.2.1, which leaves the run object (last line of the
>>> code) undefined:
>>> iteration 1
>>> iteration 2
>>> iteration 3
>>> iteration 4
>>> Error in lme.formula(fixed = zz ~ test + coder, random = ~1 | id, data =
>>> list( :
>>> false convergence (8)
>>> Under R 2.1.1, I get exactly 4 iterations as well, but no "false
>>> convergence" message, and run is defined.
>>> R-help at stat.math.ethz.ch mailing list
>>> PLEASE do read the posting guide!
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
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