Skip to content
Prev 16 / 20628 Next

Timing for lmer2 versus lmer for chocolate cake data (WinXP)

On 1/28/07, Douglas Bates <bates at stat.wisc.edu> wrote:
I have just committed a couple of changes to the SVN archive for the
lme4 package

https://svn.r-project.org/R-packages/trunk/lme4

that allow lmer2 to fit this model to these data and obtain the same
estimates as lmer did.

One approach is to fit a simpler model with additive fixed effects
first and use the fitted variance components from that model as the
starting estimates for the model that allows for interaction of the
fixed effects.  The version of lmer2 on the SVN archive allows you to
specify a start argument that should be in the form of the ST slot for
the model.  If you fit two models with the same random effects
specification then you can use the ST slot from the first as the
starting estimate for the second.

The other thing that I did was to change the call in lmer2 to the
nlminb optimizer so that it uses the default setting of the rel.tol
convergence criterion.  In the currently released version of lme4 the
this criterion is reset so that convergence is declared if the
deviance apparently has been determined to an accuracy of 0.001.  I
made this change because we observed that in many cases a substantial
portion of the iterations of the optimizer were spent at the optimum
making very small changes in parameter values that did not have a
substantial impact on the value of the deviance.

It looks like changing that criterion was too risky.  I would rather
have slower optimization with a higher degree of confidence that the
declared optimum is indeed the optimum.

I enclose R code and output for fitting these models with the modified
(and, as yet, unreleased) version of lmer2.  I also modified the cake
data so that the temperature is an ordered factor.  This results in
slightly different values of the REML criterion but you can still see
the pattern of convergence.  My purpose in using an ordered factor is
to see if the linear contrast in the temperature is dominant, which it
is.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cake_R.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20070129/cce70675/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cake_Rout.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20070129/cce70675/attachment-0001.txt>