Skip to content
Prev 1355 / 20628 Next

Lmer-model fails to converge

On Thu, Sep 4, 2008 at 10:06 AM, Ivar Herfindal
<ivar.herfindal at bio.ntnu.no> wrote:
Ah, you are working with a very recent version of the lme4 package.  I
will commit another version of the lme4 package later this afternoon
with the ability to specify

lmer(..., control = list(maxIter = 500))

to increase the number of function evaluations.

However, that "horrible hack" that I described previously would have
updated the value of mylmermodel to the new parameter values so you
actually have the refitted model.  That is part of the horrible aspect
- this is not supposed to happen in an R function.  An R function
should not change the value of its arguments but this one does.  The
reason is efficiency - if the arguments were being copied to the
result at every iteration most of the time would be spent copying the
structure representing the model.  Especially with very large data
sets like yours, things would slow down to a crawl.  So some of those
C functions called with .Call, like "mer_optimize" here, do things
that they shouldn't.