[R-sig-ME] State of the lme4 package

Douglas Bates bates at stat.wisc.edu
Thu Jul 10 16:19:07 CEST 2008

There have been questions about the new release of lme4 and how it
relates to other packages such as languageR, arm and gmodels.

The version numbers that Martin and I use for the Matrix and lme4
packages are getting ever closer to 1.0, although those who examine
the sequence will see that it will never get there.  We hope that we
will break the sequence and actually hit 1.0 in the not too distant
future.  Matrix will hit 1.0 first.  Most of the development on that
package is being done by Martin and I think he just wants to tidy up a
few tests, etc. then release the 1.0 version.  The plan is that Matrix
will become a recommended package, perhaps as early as R-2.8.0

There are parts of the lme4 package that you can regard as being
stable.  The underlying representation of mixed-effects models (the
"mer" class) is stable.  This representation encompasses linear mixed
models, generalized linear mixed models, nonlinear mixed models and
generalized nonlinear mixed models.    The functions for fitting
linear mixed models and generalized linear mixed models also can be
regarded as stable.  I plan on adding one more argument to those
functions but it will not change the effect of current calls.
Nonlinear mixed models are not yet stable.  At present the deviance is
incorrect.  I think I know what the problem is but will need to check
whether the fix that I have in mind works.  Bin Dai is working on
adding adaptive Gauss-Hermite quadrature for GLMMs and NLMMs.  The
form of the argument to glmer and nlmer to use AGQ instead of the
Laplace approximation is now set - it should simply be a matter of
activating those switches.

The implementation of mcmcsamp is incomplete.  Currently the
implementation only allows linear mixed models with scalar random
effects.  Even that part of the implementation has, I suspect, some
"infelicities".  The chains produced for some models have peculiar
properties.  I hope the infelicities are in the implementation and not
in the theory.  Of course, it will be easier to check when I actually
write down the theory.

As has been mentioned, hatTrace is not currently active. It is the
age-old problem -- it could be implemented fairly easily in a form
that would work well for simpler models fit to small to medium-sized
data sets but that implementation would blow up when applied to
complex models fit to large data sets.  It will take some thought to
be able to create an implementation that works well on complex models
and large data sets.

So the good news is that lme4 has a stable foundation.  The bad news
is that most of the functions related to inferences for fixed-effects
parameters in linear mixed models (i.e. mcmcsamp, hatTrace,
Kenward-Roger approximation to degrees of freedom and multiplier
factors) are not yet stable.

More information about the R-sig-mixed-models mailing list