now exported, for downstream package-author convenience
the package now depends on Matrix >=1.1-0 and RcppEigen >=0.3.1.2.3
rename.response option for
refit (see BUG
eliminated redundant messages about suppressed fixed-effect correlation matrices when p>20
most inverse-link functions are now bounded where
.Machine$double.eps, allowing fitting
of GLMMs with extreme parameter values
merMod objects created with
refit did not
rename.response option added to
refit.merMod, to allow
this (but the default is still
back-compatibility (reported by A. Kuznetsova)
fixed buglet preventing on-the-fly creation of index variables,
y~1+(1|rownames(data)) (reported by J. Dushoff)
predict now works properly for
with basis-creating terms (e.g.
step sizes determined from fixed effect coefficient standard
errors after first state of
glmer fitting are now bounded,
allowing some additional models to be fitted
refit() now works, again, with lists of
length 1, so that e.g.
(Reported by Gustaf Granath)
getME(.,"ST") was returning a list
containing the Cholesky factorizations that get repeated in
Lambda. But this was inconsistent with what
ST represents in
lme4.0. This inconsistency has now been fixed and
getME(.,"ST") is now consistent with the definition of the
ST matrix in
https://github.com/lme4/lme4/issues/111 for more
detail. Thanks to Vince Dorie.
Corrected order of unpacking of standard
deviation/correlation components, which affected results
confint(.,method="boot"). (Reported by Reinhold
fixed a copying bug that made
modify the original model
(g)lmerControl have been changed (from recent development
check.nlev.* respectively, and the default values of
have been changed to
(g)lmerControl, arguments to the optimizer
should be passed as a list called
optCtrl, rather than
specified as additional (ungrouped) arguments
postVar argument to
ranef has been
changed to the (more sensible)
condVar ("posterior variance"
was a misnomer, "conditional variance" – short for "variance of the
conditional mode" – is preferred)
REform argument to
predict has been changed
ReForm for consistency
tnames function, briefly exported, has been
merMod objects is now more
terse, and different from
objective method for the
reference class now takes an optional
NULL) to allow calculation of the
objective function with a residual variance different from
the profiled value (Vince Dorie)
Because the internal computational machinery has changed,
results from the newest version of
lme4 will not be numerically
identical to those from previous versions. For reasonably well-
defined fits, they will be extremely close (within numerical
tolerances of 1e-4 or so), but for unstable or poorly-defined fits
the results may change, and very unstable fits may fail when they
(apparently) succeeded with previous versions. Similarly, some fits
may be slower with the new version, although on average the new
version should be faster and more stable. More numerical
tuning options are now available (see below); non-default settings
may restore the speed and/or ability to fit a particular model without
an error. If you notice significant or disturbing changes when fitting
a model with the new version of
lme4, please notify the maintainers.
VarCorr returns its results in the same format as before (as a
list of variance-covariance matrices with
attributes, plus a
sc attribute giving the residual standard
deviation/scale parameter when appropriate), but prints them in a
different (nicer) way.
residuals gives deviance (rather than Pearson)
residuals when applied to
glmer fits (a side effect of matching
behaviour more closely).
As another side effect of matching
behaviour, reported log-likelihoods from
are no longer consistent with those from pre-1.0
but are consistent with
More use is made of S3 rather than S4 classes and methods: one
side effect is that the
lme4 packages are now much more
compatible; methods such as
fixef no longer conflict.
The internal optimizer has changed.
[gn]lmer now has an
"Nelder_Mead" is the default for
while a combination of
"bobyqa" (an alternative derivative-free
"Nelder_Mead" is the default for
glmer. To use the
nlminb optimizer as in the old version of
lme4, you can use
control=list(method="nlminb") (you will
optimx package to be installed and loaded). See
lmerControl for details.
Families in GLMMs are no longer restricted to built-in/hard-
coded families; any family described in
family, or following that
design, is usable (although there are some hard-coded families, which
will be faster).
[gn]lmer now produces objects of class
merMod rather than
mer as before.
the structure of the
Zt (transposed random effect
design matrix) as returned by
getME(.,"Zt"), and the
corresponding order of the random effects vector
getME(.,"u")) have changed. To retrieve
in the old format, use
the package checks input more thoroughly for
non-identifiable or otherwise problematic cases: see
lmerControl for fine control of the test behaviour.
getME accessor method allows
extraction of a wide variety of components of a mixed-model
getME also allows a vector of objects to be returned as
a list of mixed-model componenets. This has been backported to
be compatible with older versions of
lme4 that still produce
objects rather than
merMod objects. However, backporting is incomplete;
some objects are only extractable in newer versions of
Optimization information (convergence codes, warnings, etc.)
is now stored in an
bootMer provides a framework for obtaining parameter confidence
intervals by parametric bootstrapping.
plot.merMod provides diagnostic plotting
methods similar to those from the
predict.merMod method gives predictions;
it allows an effect-specific choice of conditional prediction or prediction at the
population level (i.e., with random effects set to zero).
Likelihood profiling for
glmer results (see
Confidence intervals by likelihood profiling (default),
parametric bootstrap, or Wald approximation (fixed effects only):
nAGQ=0, an option to do fast (but inaccurate) fitting of GLMMs.
devFunOnly=TRUE allows the user to extract a deviance
function for the model, allowing further diagnostics/customization of
The internal structure of [gn]lmer is now more modular, allowing
finer control of the different steps of argument checking; construction
of design matrices and data structures; parameter estimation; and construction
of the final
merMod object (see
methods return full versions (including random effect terms and
input variables) by default, but a
allows access to the fixed effect submodel.
glmer.nb provides an embryonic negative
binomial fitting capability.
Adaptive Gaussian quadrature (AGQ) is not available for multiple and/or non-scalar random effects.
Posterior variances of conditional models for non-scalar random effects.
Standard errors for
Automatic MCMC sampling based on the fit turns out to be very difficult
to implement in a way that is really broadly reliable and robust;
will not be implemented in the near future. See
pvalues for alternatives.
"R-side" structures (within-block correlation and heteroscedasticity) are not on the current timetable.
In a development version, prior weights were not being used properly in the calculation of the residual standard deviation, but this has been fixed. Thanks to Simon Wood for pointing this out.
In a development version, the step-halving component of the penalized iteratively reweighted least squares algorithm was not working, but this is now fixed.
In a development version, square
RZX matrices would lead to a
pwrssUpdate did not converge in 30 iterations error. This has been fixed
by adding an extra column of zeros to
Previous versions of
mcmcsamp function, which efficiently generated
a Markov chain Monte Carlo sample from the posterior
distribution of the parameters, assuming flat (scaled
likelihood) priors. Due to difficulty in constructing a
mcmcsamp that was reliable even in
cases where the estimated random effect variances were
near zero (e.g.
mcmcsamp has been withdrawn (or more precisely,
not updated to work with
lme4 versions >=1.0).
glmer with the default
lmer, but this is deprecated
(in the future
fit a LMM using the penalized iteratively reweighted least squares
algorithm). Please call
lmer with a
family argument redirects
glmer; this is deprecated. Please call
The underlying algorithms and representations for all the mixed-effects models fit by this package have changed - for the better, we hope. The class "mer" is a common mixed-effects model representation for linear, generalized linear, nonlinear and generalized nonlinear mixed-effects models.
ECME iterations are no longer used at all, nor are analytic gradients. Components named 'niterEM', 'EMverbose', or 'gradient' can be included in the 'control' argument to lmer(), glmer() or nlmer() but have no effect.
PQL iterations are no longer used in glmer() and nlmer(). Only the Laplace approximation is currently available. AGQ, for certain classes of GLMMs or NLMMs, is being added.
The 'method' argument to lmer(), glmer() or nlmer() is deprecated. Use the 'REML = FALSE' in lmer() to obtain ML estimates. Selection of AGQ in glmer() and nlmer() will be controlled by the argument 'nAGQ', when completed.
The representation of mixed-effects models has been dramatically changed to allow for smooth evaluation of the objective as the variance-covariance matrices for the random effects approach singularity. Beta testers found this representation to be more robust and usually faster than previous versions of lme4.
The mcmcsamp function uses a new sampling method for the variance-covariance parameters that allows recovery from singularity. The update is not based on a sample from the Wishart distribution. It uses a redundant parameter representation and a linear least squares update.
CAUTION: Currently the results from mcmcsamp look peculiar and are probably incorrect. I hope it is just a matter of my omitting a scaling factor but I have seen patterns such as the parameter estimate for some variance-covariance parameters being the maximum value in the chain, which is highly unlikely.
The 'verbose' argument to lmer(), glmer() and nlmer() can be used instead of 'control = list(msVerbose = TRUE)'.