[R-sig-ME] Lmer-model fails to converge
Ivar Herfindal
ivar.herfindal at bio.ntnu.no
Thu Sep 4 17:06:38 CEST 2008
Dear Mixed-list
I am trying to fit a mixed linear model with the lmer-function in the
lme4-packages. After fitting the model, I get this warning:
Warning message:
In mer_finalize(ans) : iteration limit reached without convergence (9)
By searching the R-archive, I found some sort of solution posted by
Douglas Bates
(http://finzi.psych.upenn.edu/R/Rhelp02a/archive/138008.html) which will
provide a greater number of iterations. I therefore tried:
(newmodel <- .Call("mer_optimize", mylmermodel, PACKAGE = "lme4"))
The "FALSE" argument in Douglas Bates suggestion caused an error
message, but it works fine without, and the model do now converge.
However, I cannot figure out how to get the model from the last part of
the iterations. That is, the .Call("mer_optimize"...) only print the
verbose from the fitting process, but does not give an mer-object that I
can evaluate and extract random and fixed effects from. Does anyone know
if this "horrible hack" (Bates' own words) can give a mer-object or can
I only use it to evaluate how far my initial model was from convergence?
I am sorry that I cannot provide any example from my own data (the
dataset is too large to attach), but I assume that any solution should
be independent of the model or data.
Cheers
Ivar
SessionInfo
sessionInfo()
R version 2.7.2 (2008-08-25)
i386-pc-mingw32
locale:
LC_COLLATE=Norwegian (Bokmål)_Norway.1252;LC_CTYPE=Norwegian
(Bokmål)_Norway.1252;LC_MONETARY=Norwegian
(Bokmål)_Norway.1252;LC_NUMERIC=C;LC_TIME=Norwegian (Bokmål)_Norway.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] mgcv_1.4-1 splancs_2.01-24 sp_0.9-26
lme4_0.999375-26 Matrix_0.999375-13 lattice_0.17-13
loaded via a namespace (and not attached):
[1] grid_2.7.2
>
More information about the R-sig-mixed-models
mailing list