| NEWS | R Documentation |
lme4 News
CHANGES IN VERSION 1.1-38
BUG FIXES
$se.fitcomponent of predictions from GLMMs whentype = "response"is now transformed from the link scale tothe response scale (GH #847, @leorjorge)predictions with
se.fit=TRUE/allow.new.levels=TRUEwork for a wider range of cases (GH #691, GH #753)
NEW FEATURES
the
startargument to[g]lmernow allows'beta' as a synonym for 'fixef'confint.merModnow allowssignamesas anargument instead ofoldNames, for consistency withprofile.merMod;oldNamesis deprecatedadded six publically available datasets:
cbpp2(contagious bovine pleuropneumonia (extended version ofcbpp)),culcitalogreg(coral-eating seastarCulcita novaeguineae). Also added the alternative version,culcitavolume,gopherdat2(gopher tortoises shell remains),salamander(mountain dusky salamander mating),schizophrenia(National Institute of Mental Health schizophrenia collaborative study),toenail(toenail onychomycosis data from dermatophyte infections).
allFit(..., start_from_mle = TRUE)now specifies that models should be refittedusing starting parameter values from the original model fit,which should increase efficiencyPredictor variables can be now automatically scaled and centered via
(g)lmerControl(..., autoscale = TRUE), with resultsreported on the original data scale. Seevignette("autoscale", package = "lme4")for details (wish of GH #227, although at present only predictorvariables can be scaled)
USER-VISIBLE CHANGES
lme4now depends on thereformulaspackage for formula processing etc.; the corresponding functions(expandDoubleVerts,subbars,findbars,nobars, etc.) are still (re-)exported from the package,but throw a warning if called directly(use e.g.reformulas::findbars(...)to avoid the warning)derivative-based convergence checks are now skipped formodels with large data (number of observations greater thanthe
check.conv.nobsmaxcomponent of[g]lmerControl()); default threshold is 1e4 observations.If desired, derivatives can be calculated (but not checked)by explicitly settingcalc.derivsto TRUE.Derivative calculations are now skipped for models withsingular random effects components (unless
calc.derivsisexplicitly set to TRUE in[g]lmerControl).
CHANGES IN VERSION 1.1-37 (2025-03-26)
NEW FEATURES
simulate.merModand.simulateFungain thecluster.randargument to allow specifying non-Normalcluster random effects in simulations.simulation.Rmd, and derived .md and .html files inmisc/notes/, trace the flow of the simulation just beforethis change. Likely of interest only to developers.
USER-VISIBLE CHANGES
headline of
printandsummaryoutput forglmerfits now labels the minimum of the objective function(correctly) as "-2*log(L)" rather than "deviance" (inspired byglmmTMBGH #1156)
CHANGES IN VERSION 1.1-36 (2025-1-11)
NEW FEATURES
The full (joint) conditional covariance matrix of fixedeffects and conditional modes is now available via
vcov(fitted_model, full = TRUE)Random effects formulas are now processed by code fromthe
reformulaspackage, meaning that someextended random effects formulas (such as(1|f*g)forcrossed random effects) will now work
USER-VISIBLE CHANGES
simulatewithnewparamsno longer printsa message if the individual parameter vectors are unnamed
BUG FIXES
floating-point errors leading to slightly negative deviancescould lead to NaN deviance residuals (Wolfgang Viechtbauer, GH #812)
CHANGES IN VERSION 1.1-35.5 (2024-07-03)
USER-VISIBLE CHANGES
in
predict, the synonymsReForm,REForm, andREformofre.formare now hard-deprecated,giving an error (after 10 years of soft deprecation)
OTHER CHANGES
minor adjustments in test tolerances
correct Matrix dependency to >= 1.2-3
CHANGES IN VERSION 1.1-35.4 (2024-06-19)
BUG FIXES
predict(., re.form=...)works in a wider range ofcases (GH #691)Gamma simulation now uses correct shape parameter (GH #782)
Avoid triggering RcppEigen UBSAN bug(?) in the case ofprofiling fixed effects in a
merModobject witha single fixed effect parameter (GH #794: lots of help fromDirk Eddelbuettel and Mikael Jagan)fix bug in plot methods (cbind'ing zero-length objects)
CHANGES IN VERSION 1.1-35.3 (2024-04-16)
BUG FIXES
bug-fix for ASAN/memory access problem in CholmodDecomposition(Mikael Jagan)
CHANGES IN VERSION 1.1-35.2 (2024-03-28)
This is primarily a 'bump' release to ensure that packagerepositories rebuild binaries with the latest version of the
Matrixpackage.
BUG FIXES
simulateworks (again) withre.form=NULLwhenNAvalues are present in the data (GH #737, @frousseu)
USER-VISIBLE CHANGES
updated tests of upstream
Matrixversion; shouldnow warn only on ABI incompatibility, not on package versionmismatch alone
CHANGES IN VERSION 1.1-35.1 (2023-11-05)
USER-VISIBLE CHANGES
lFormulaandglFormulaonce againdoallow matrix-valued responses (for use in downstream packages likegalamm)
CHANGES IN VERSION 1.1-35 (2023-11-03)
NEW FEATURES
predict.merModnow has ase.fitmethod, whichcomputes the standard errors of the predictions, conditional on theestimatedtheta(variance-covariance) parameters
USER-VISIBLE CHANGES
using
lmerwith a matrix-valued response now throwsa more informative error message, directing the user to?refit
CHANGES IN VERSION 1.1-34 (2023-07-04)
BUG FIXES
summary(<merMod>)now records ifcorrelationwasspecified explicitly and to what; and itsprint()method takes itinto account; notably summary(<merMod>, correlation=TRUE) will bydefault print the correlation (matrix of the fixed effects) fixing GH #725
NEW FEATURES
refitgains anewweightsargument
CHANGES IN VERSION 1.1-33 (2023-04-25)
BUG FIXES
a boundary check could fail occasionally when large dataproduced an NA value in a computed gradient; now warns instead(GH #719, Mathias Ambuehl)
allFitnow works better whenoptimxanddfoptimpackages are not installed (GH #724)refitreset internal degrees of freedom componentincorrectly for REML fits (resulted in incorrect reported REML criteria,but otherwise harmless: side effect of GH #678)
NEW FEATURES
dotplotandqqmathmethods gain alevelargument to set the width of confidence intervalsdotplotmethod is now more flexible, using ".v"options (lty.v,col.line.v,lwd.v) to setappearance of vertical lines (Iago Giné Vázquez)refitgains anewweightsargument (GH #678)
CHANGES IN VERSION 1.1-32 (2023-03-14)
USER-VISIBLE CHANGES
formatVC()gets a newoptional argumentcorrindicating if correlations orcovariances should be used for vector random effects;this corresponds toprint(<merMod>, ranef.corr = ...).By default, it is FALSE forcomp = "Variance", fixing (GH #707).qqmath.merModadds a (useless)dataargumentfor S3 compatibility. Going forward, theidandidLabelsarguments should always be specified by name.We have added code to try to detect/warn when this is not done.
BUG FIXES
nobarsnow retains the environment of its formulaargument (GH #713, Mikael Jagan)
CHANGES IN VERSION 1.1-31 (2022-11-01)
BUG FIXES
confint(fm, <single string>)now works (after years ofbeing broken) again.simulating from binomial model with a factor response, whenthe simulated response contains only a single factor level, now works(Daniel Kennedy)
CHANGES IN VERSION 1.1-30 (2022-07-08)
USER-VISIBLE CHANGES
nl(term names) component added to output list ofmkReTrms (GH #679)eliminate partial-matching of
eta(foretastart) (GH #686: not actually "user-visible" unlessgetOption("warnPartialMatchDollar")isTRUE)summarymethod doesn't break for GLMMs other thanbinomial/Poisson whenmerDeriv'svcov.glmerModmethod isattached (GH #688)
BUG FIXES
better handling of
simulate(., re.form = NULL)whenmodel frame contains derived components (e.g.offset(),log(x))(https://github.com/florianhartig/DHARMa/issues/335)bootMerworks withglmmTMBagain (broken in1.1-29)maxfunargument toallFitcontrols maxfunction evaluations for every optimizer type (GH#685)
CHANGES IN VERSION 1.1-29 (2022-04-07)
USER-VISIBLE CHANGES
prediction with new levels (when not allowed) returns a moreinformative error message (displays a list of unobserved levels)
BUG FIXES
glmer.nbnow works whenlme4is not loaded (GH #658, @brgew)tests for singularity (
check.conv.singular) now runindependently of derivative computation (e.g., whencalc.derivs=FALSE) (GH #660, @palday)influence.merModnow works when data were originallyspecified as a tibblefixed bug in
cooks.distancemethod forinfluence.merMod(i.e., objects created viainfluence(fitted_model)) (John Fox) (GH #672)predictworks for formulas containing . whennewdatais specified (GH #653)bootMernow correctly inherits control settings from original fit
CHANGES IN VERSION 1.1-28 (2022-02-04)
USER-VISIBLE CHANGES
construction of interacting factors (e.g. when
f1:f2orf1/f2occur in random effects terms) is now more efficientfor partially crossed designs(doesn't try to create all combinations off1andf2) (GH #635 and #636)mkNewReTrmsis exportedsingular-fit message now refers to
help("isSingular")rather than?isSingular
TESTS
fix
all.equal(p1,p2,p3)and similarexpect_equal()thinkosfix some tests only run when
lme4:::testLevel() > 1;adapt tests for upcoming Matrix 1.4-1 which hasnames(diag(<sparse>))
BUG FIXES
reOnlypreserves environment (GH #654, Mikael Jagan)backward-compatibility hooks changed to evaluate at run-time(i.e., in
.onLoad()) rather than at build time (GH #649)lmListno longer warns whendatais a tibble(GH #645)
CHANGES IN VERSION 1.1-27.1 (2021-06-22)
USER-VISIBLE CHANGES
influence.merModallows user-specified starting parameterscleaned up performance vignette
BUG FIXES
cooks.distancenow works with objects computedbyinfluencemethodinfluence.merModnow works withglmermodelsusingnAGQ=0predict(with new data) andsimulatemethodsnow work for models with >100 levels in a random effect groupingvariable (GH #631)
CHANGES IN VERSION 1.1-27 (2021-05-15)
USER-VISIBLE CHANGES
improvements from Lionel Henry (viahttps://github.com/lme4/lme4/pull/587) to fix corner cases indata checking; also resolves GH #601 (allFit scoping)
getME(., "lower")now has names (request of GH #609)improved detection of
NaNin internal calculations(typically due to underflow/overflow or out-of-bounds linearpredictors from non-constraining link functions such as identity-linkGamma models)influence.merModallows parallel computationthe
statmodpackage is no longer required unless attemptingto simulate results from a model with an inverse Gaussian response
BUG FIXES
long formulas work better in
anovaheadings (GH #611)
CHANGES IN VERSION 1.1-26 (2020-11-30)
BUG FIXES
predict,model.frame(.,fixed.only=TRUE)workwith variable names containing spaces (GH #605)simulateworks when original response variable waslogicaldensityplothandles partly broken profiles more robustly
NEW FEATURES
thprmethod fordensityplot()(for plottingprofiles scaled as densities) gets new arguments
CHANGES IN VERSION 1.1-25 (2020-10-23)
Set more tests to run only if environment variable
LME4_TEST_LEVEL>1
CHANGES IN VERSION 1.1-24 (never on CRAN)
USER-VISIBLE CHANGES
anova()now returns a p-value ofNAif the dfdifference between two models is 0 (implying they are equivalentmodels) (GH#583, @MetaEntropy)speedup in
coef()for large models, by skippingconditional variance calculation (Alexander Bauer)simulate.formulamachinery has changed slightly,for compatibility with theergmpackage (Pavel Krivitsky)informational messages about (non-)convergence improved (GH#599)
improved error messages for 0 non-NA cases in data (GH #533)
NEW FEATURES
getME(.,"devfun")now works forglmerobjects.Additionally,profile/confintfor GLMMsno longer depend on objects in the fitting environmentremaining unchanged (GH #589). This change also affects likelihoodprofiling machinery; results ofglmerprofiling/CIs maynot match results from previous versions exactly.
BUG FIXES
improved handling/documentation of
glmer.nbcontrols(GH #556)predictworks better forgamm4objects (GH#575)resolved some long-standing UBSAN issues (GH #561)
CHANGES IN VERSION 1.1-23 (2020-03-06)
This is primarily for CRAN compliance (previous submission wasretracted to allow time for downstream package adjustments).
Some PROTECT/UNPROTECT fixes
CHANGES IN VERSION 1.1-22 (never on CRAN)
USER-VISIBLE CHANGES
prediction now works better for factors with many levels(GH#467, solution by @sihoward)
minor changes to argument order in
[g]lmerControl;default tolerance for convergence checks increased from 0.001 to 0.002forglmerControl(now consistent withlmerControl)lmer(*, family="<fam>")is no longer valid; it had beendeprecated since 2013-06.lmer(),glmer(), andnlmer()no longerhave a formal...argument. This defunctifies the use of asparseX = .argument and will reveal some user errors, whereextraneous arguments were previously disregarded.In
isSingular(x, tol), the default tolerance (tol) hasbeen increased from1e-5to1e-4, the default ofcheck.conv.singularing?lmerControl().for clarity and consistency with base R methods,some column names of
anova()output are changed:"Df" becomes "npar", "Chi Df" becomes "Df" (GH #528)simulate()now works with inverse-Gaussian models(GH #284 revisited, @nahorp/Florian Hartig)single-model mode of
anova()now warns about unused arguments in ...(e.g.type="III")default tolerances for
nloptwrap/BOBYQA optimizertightened (xtol_absandftol_abswere 1e-6,now 1e-8). (To revert to former tolerances, usecontrol=lmerControl(optimizer="nloptwrap",optCtrl=list(xtol_abs=1e-6, ftol_abs=1e-6)).)
BUG FIXES
improved checking for missing data (@lionel-)
internal
checkZrank()should be able to deal with(Matrixpackage)rankMatrix()returningNA.allFit(fm)now works for a model that had an explicitcontrol = lmerControl(..)call.internal
getStart()now works when model'sstartwas specified as a list,and when called fromdrop1()ona submodel, fixing GH #521.internal function
mkdevfunnow works even if there isan extraneousgetCallfunction defined in the globalenvironment (GH #535)allFit()works even if a variable with symboliis used somewhere in the original model call (GH #538,reported by Don Cohen); generally more robustglmer.nbworks even if an alternative versionofnegative.binomial(other than the one fromMASS)is loaded in the workspace(e.g. by theGLMMadaptivepackage) (GH#516)levelargument is now honoured byconfint(..., type="boot", level=...)(GH #543)
CHANGES IN VERSION 1.1-21 (2019-03-05)
USER-VISIBLE CHANGES
bootMernow traps and stores messages, warnings, and errorsbootMerreturns an object of classc("bootMer","boot"); newprintandconfintmethods for classbootMersmall changes to wording of singular-fit messages
CHANGES IN VERSION 1.1-20 (2019-02-04)
USER-VISIBLE CHANGES
default value for
condVar(whether to return conditional variancesas part of theranef.merModobject) is nowTRUEchanged default optimizer to "nloptwrap" (BOBYQAimplementation from the
nloptrpackage) forlmermodels. To revert to the old default, usecontrol=lmerControl(optimizer="bobyqa")
BUG FIXES
adapted tests to work with R-devel's more consistent
formula(model.frame(.))behavior.
CHANGES IN VERSION 1.1-19 (2018-11-10)
NEW FEATURES
influence measure code from
carrolled in (see?influence.merMod)mkReTrmgets new argumentsreorder.terms,reorder.varsto control arrangement of RE terms andindividual effects with RE terms within model structuresadding material from theRePsychLing package(on GitHub; see Bates et al 2015 arXiv:1506.04967) toshow orthogonal variance components.
new utility
isSingular()function fordetecting singular fitsallFitfunction/methods have been moved to the mainpackage, rather than being included in an auxiliary source file;computations can (in principle) be done in parallel
USER-VISIBLE CHANGES
by default a message is now printed for singular fits(i.e., fits with linear combinations of variance componentsthat are exactly zero)
as.data.frame.merModfinds conditional varianceinformation stored either asattr(.,"postVar")orattr(.,"condVar")(forglmmTMBcompatibility)change to defaults of
[g]lmerControlto print amessage when fits are singularpost-fitting convergence checks based on estimated gradientand Hessian (see
troubleshooting) are no longerperformed for (nearly-)singular fits (seeisSingular)
CHANGES IN VERSION 1.1-18-1 (2018-08-17)
This is a minor release; the only change is to roll back (unexport) the
influence.merModmethod, pending resolution of conflicts with the car package
CHANGES IN VERSION 1.1-18 ((2018-08-16)
USER-VISIBLE CHANGES
ranef(.,condVar=TRUE)now works when thereare multiple random effects terms per factor
NEW FEATURES
rstudentandinfluencemethods are availableformerModobjectsdevfun2function (for generating a deviancefunction that works on the standard deviation/correlation scale)is now exported
BUG FIXES
lmListnow obeys itspoolargument (instead ofalways using what currently is the default, GH #476)
CHANGES IN VERSION 1.1-17 (2018-04-03)
This is a maintenance release only (fixes CRAN problems withcross-platform tests and examples)
CHANGES IN VERSION 1.1-16 (2018-03-28)
BUG FIXES
lmListno longer ignores thesubsetargument(John Fox)fixed several minor issues with predicting when (1) groupingvariables have different levels from original model (e.g. missinglevels/factor levels not explicitly specified in
newdata) or (2)re.formis a subset of the original RE formula and some(unused) grouping variables are omitted fromnewdata(GH#452, #457)
USER-VISIBLE CHANGES
lmListtries harder to collect errors and pass themon as warningsdocumented
as.functionmethod (given amerModobject, returns a function that computes the deviance/REML criterion forspecified parameters)printmethod forsummary.merModobjectsno longer collapses small values of the t-statistic to zero
CHANGES IN VERSION 1.1-15 (2017-12-21)
BUG FIXES
model.frame(., fixed.only=TRUE)now handles models with"non-syntactic" (e.g. space-containing/backtick-delimited)variables in the formula.confint(<merMod>)now works again for the defaultmethod"profile".
USER-VISIBLE CHANGES
exported
dotplot.ranef.mer
CHANGES IN VERSION 1.1-14 (2017-09-27)
Primarily an R-devel/CRAN-compatibility release.
NEW FEATURES
added
transfargument todotplot.ranef.merto allow back-transformation (Ferenci Tamás, GH #134)added
as.data.frame.ranef.merconvenience methoduser can specify initial value for overdispersion parameterin
glmer.nb(Timothy Lau, GH #423)
BUG FIXES
fix bug where NAs in fitting data were carried over intopredictions on new data (!) (lmwang9527, GH #420)
fix bug with long terms in models with || notation
nlmernow respects user-specified lower/upper bounds(GH #432)confint.thpr(confint method applied to analready-computed profile now respects "theta_"/"beta_"specifications to return all random-effect or all fixed-effectconfidence intervals, respectively.
DOCUMENTATION IMPROVEMENTS
document need to export packages and objects to workerswhen using
bootMerwith snow
USER-VISIBLE CHANGES
improved warning message when using
lmerControl()withglmer(GH #415)avoid deparsing big data frames when checking data (GH#410)
pass
verboseoptions to nloptr optimizers whenusingnloptwrap(previously ignored, with a warning)the
fl(factor list) component ofmkReTrmsobjects is now returned as a list rather than a data frame
CHANGES IN VERSION 1.1-13 (2017-04-18)
NEW FEATURES
added
prof.scaleargument toprofile.merMod,documented caveats about usingvarianceProf/logProftransformation methods for correlation parameters
BUG FIXES
suppressed spurious contrast-dropping warning (GH #414)
fixed bug in
confint.lmList4(GH #26)fixed bug when
FUNreturned an unnamedvector inconfint(.,FUN=FUN,method="boot")fixed small bug relating to
nAGQ0initStep=FALSE
CRAN-COMPATIBILITY UPDATES
fixed time stamps on compiled versions of vignettes
CHANGES IN VERSION 1.1-12 (2016-04-15)
This release is primarily a bump for compatibility with the newWindows toolchain. Some small documentation and test changes.
USER-VISIBLE CHANGES
reduced default print precision of fixed-effect correlationmatrix in
summary.merMod(related to GH #300)
BUG FIXES
fixed bug inde novo Gamma-response simulations
CHANGES IN VERSION 1.1-11 (2016-02-11)
USER-VISIBLE CHANGES
change
VarCorrmethod signature (for compatibilitywith upstreamnlmechanges)
BUG FIXES
several
glmer.nbbugs fixed (generally notchanging results, but causing warnings and errors e.g.during bootstrapping)fixes to some
lmListbugs (Github #320)minor documentation, vignette updates
minor fix to
plot.merModwithidspecifiedbootMernow handles separate offset term properly(Github #250)
CHANGES IN VERSION 1.1-10 (2015-10-05)
This release is primarily a version bump for the release ofthe paper in J. Stat. Software.
USER-VISIBLE CHANGES
updated CITATION file.
NEW FEATURES
We export set of about a dozen printing utility functionswhich are used in our
printmethods.bootMernow allows the use ofre.form.
BUG FIXES
fixed reordering bug in names of
getME(.,"Ztlist")(terms are reordered in decreasing order of the number oflevels of the grouping variable, but names were not beingreordered)fixed issue with simulation when complex forms (suchas nested random effects terms) are included in the model(Github #335)
CHANGES IN VERSION 1.1-9 (2015-08-20)
USER-VISIBLE CHANGES
explicit
maxitarguments for various functions(refit,mkGlmerDevfun, ...)
NEW FEATURES
termsandformulamethods now haverandom.onlyoptionsgetMEgains aglmer.nb.thetaoption.It is now (an S3) generic with an"merMod"method inlme4 and potentially other methods in dependent packages.simulatenow works forglmer.nbmodels(Github #284: idea from @aosmith16)
BUG FIXES
prediction and simulation now work when random-effectsterms have data-dependent bases (e.g.,
poly(.)orns(.)terms) (Github #313, Edgar Gonzalez)logLikforglmer.nbmodels nowincludes the overdispersion parameter in theparameter count (dfattribute)lmListhandles offsets and weights betterlots of fixes to
glmer.nb(Github #176, #266, #287,#318).Please note that glmer.nb is still somewhatunstable/under construction.
CRAN-COMPATIBILITY UPDATES
import functions from base packages to pass CRAN checks
tweak to failing tests on Windows
CHANGES IN VERSION 1.1-8 (2015-06-22)
NEW FEATURES
getMEgains a"Tlist"option(returns a vector of template matrices from which the blocks ofLambdaare generated)hatvaluesmethod returns the diagonal of the hatmatrix of LMMsnlminbwrapconvenience function allows use ofnlminbwithout going through theoptimxpackageas.data.frame.VarCorr.merModgains anorderoption that allows the results to be sorted with variances firstand covariances last (default) or in lower-triangle orderallow more flexibility in
scalesforxyplot.thprmethod (John Maindonald)models with only random effects of the form
1|fhavebetter starting values forlmeroptimization (GaborGrothendieck)glmernow allows a logical vector as the responsefor binomial modelsanovawill now do (sequential) likelihood ratiotests for two or more models including bothmerModandglmorlmmodels (at present, only for GLMMsfitted with the Laplace approximation)
USER-VISIBLE CHANGES
deviance()now returns the deviance, rather than half thenegative log-likelihood, for GLMMs fitted with Laplace(the behaviour for LMMs and GLMMs fitted withnAGQ>1hasnot changed)convergence warning and diagnostic test issues are nowreported in
printandsummarymethodsupdatenow (attempts to) re-evaluate the original fitin the environment of its formula (as is done withdrop1)refitof a nonlinear mixed model fit now throws anerror, but this will hopefully change in future releases (relatedto bug fixes for Github #231)lmListnow returns objects of classlmList4,to avoid overwritinglmListmethods from the recommendednlmepackagenames of random effects parameters in
confintchanged (modified for consistency across methods);oldNames=TRUE(default) gives".sig01"-style names,oldNames=FALSEgives"sd_(Intercept)|Subject"-style namesconfint(.,method="Wald")result now contains rowsfor random effects parameters (values set toNA)as well as for fixed-effect parameters
BUG FIXES
simulateandpredictnow work moreconsistently with different-length data, differingfactor levels, andNAvalues (Github #153, #197, #246, #275)refitnow works correctly forglmerfits (Github #231)fixed bug in
family.merMod; non-default linkswere not retrieved correctly (Alessandro Moscatelli)fixed
bootMerbug fortype=="parametric",use.u=TRUE(Mark Lai)gradient scaling for convergence checks now uses the Cholesky factor of theHessian; while it is more correct, this will lead to some additional (probablyfalse-positive) convergence warnings
As with
lm(), users now get an error for non-finite(Inf,NA, orNaN)values in the response unlessna.actionis set toexclude or omit them (Github #310)
CHANGES IN VERSION 1.1-7 (2014-07-19)
NEW FEATURES
the
nloptrpackage is now imported;a wrapper function (nloptwrap) is provided so thatlmerControl(optimizer="nloptwrap")is all that's necessaryto usenloptroptimizers in the nonlinear optimizationstage (the default algorithm is NLopt's implementationof BOBYQA: see?nloptwrapfor examples)preliminary implementation of checks for scalingof model matrix columns (see
check.scaleXin?lmerControl)betais now allowed as a synonym forfixefwhen specifying starting parameters (Github #194)
USER-VISIBLE CHANGES
the use of
devianceto return the REML criterionis now deprecated; users should useREMLcrit()instead(Github #211)changed the default value of
check.nobs.vs.rankZto"ignore"(Github #214)
BUG FIXES
change gradient testing from absolute to relative
fix
confint(.,method="boot")to allow/workproperly withboot.typevalues other than"perc"(reported by Alan Zaslavsky)allow
plot()to work when data are specified in a differentenvironment (reported by Dieter Menne)predictandsimulatework for matrix-valuedpredictors (Github #201)other
simulatebugs (Github #212)predictno longer warns spuriously whenoriginal response was a factor (Github #205)fix memory access issues (Github #200)
CHANGES IN VERSION 1.1-6 (2014-04-13)
This version incorporates no changes in functionality, justmodifications to testing and dependencies for CRAN/backward compatibility.
BUG FIXES
change
drop1example to prevent use of old/incompatiblepbkrtestversions, for 2.15.3 compatibilityexplicitly
require(mlmRev)for tests to prevent cyclicdependencybump
RcppEigenImports: requirement from >0.3.1.2.3 to>=0.3.2.0;Rcppdependency to >= 0.10.5
CHANGES IN VERSION 1.1-5 (2014-03-14)
BUG FIXES
improved NA handling in
simulateandrefitmade internal handling of
weights/offsetarguments slightly more robust (Github #191)handle non-positive-definite estimated fixed effectvariance-covariance matrices slightly more generally/robustly(fall back on RX approximation, with a warning,if finite-difference Hessianis non-PD; return
NAmatrix if RX approximation isalso bad)
MINOR USER-VISIBLE CHANGES
Added output specifying when Gauss-Hermite quadraturewas used to fit the model, and specifying number of GHQ points(Github #190)
CHANGES IN VERSION 1.1-4
BUG FIXES
Models with prior weights returned an incorrect sigma anddeviance (Github issue #155). The deviance bug was only apractical issue in model comparisons, not with inferences given aparticular model. Both bugs are now fixed.
Profiling failed in some cases for models with vector randomeffects (Github issue #172)
Standard errors of fixed effects are now computedfrom the approximate Hessian by default (see the
use.hessianargument invcov.merMod); thisgives better (correct) answers when the estimates ofthe random- and fixed-effect parameters are correlated(Github #47)
MAJOR USER-VISIBLE CHANGES
The default optimizer for
lmerfits has beenswitched from "Nelder_Mead" to "bobyqa" because we havegenerally found the latter to be more reliable. To switchback to the old behaviour,usecontrol=lmerControl(optimizer="Nelder_Mead").Better handling of rank-deficient/overparameterizedfixed-effect model matrices; see
check.rankXoptionto[g]lmerControl. The default value is"message+drop.cols", which automatically drops redundantcolumns and issues a message (not a warning). (Github #144)
MINOR USER-VISIBLE CHANGES
slight changes in convergence checking; tolerances canbe specified where appropriate, and some default toleranceshave changed (e.g.,
check.conv.grad)improved warning messages about rank-deficiency in X and Zetc. (warnings now try to indicate whether the unidentifiabilityis in the fixed- or random-effects part of the model)
predictandsimulatenow preferre.formas the argument to specify which random effectsto condition on, but allowReForm,REForm, orREform, giving a message (not a warning) that they aredeprecated (addresses Github #170)small fixes for printing consistency in models with nofixed effects
we previously exported a
fortifyfunction identicalto the one found inggplot2in order to be able to define afortify.merModS3 method without inducing a dependency onggplot2. This has now been unexported to avoid maskingggplot2's ownfortifymethods; if you want toadd diagnostic information to the results of a model, usefortify.merModexplicitly.simulate.formulanow checks for names associatedwith thethetaandbetaparameter vectors. Ifmissing, it prints a message (not a warning); otherwise, itre-orders the parameter vectors to match the internalrepresentation.preliminary implementation of a
check.scaleXargumentin[g]lmerControlthat warns about scaling if some columnsof the fixed-effect model matrix have large standarddeviations (relative to 1, or to each other)
CHANGES IN VERSION 1.1-3
NEW FEATURES
The gradient and Hessian are now computed via finitedifferencing after the nonlinear fit is done, and the resultsare used for additional convergence tests. Control of thebehaviour is available through the
check.conv.*optionsin[g]lmerControl. Singular fits (fits with estimatedvariances of zero or correlations of +/- 1) can also be tested for,although the current default value of thecheck.conv.singularoption is"ignore"; this may be changed to"warning"in the future. The results are stored in@optinfo$derivs.(Github issue #120; based on code by Rune Christensen.)The
simulatemethod will now work to generatesimulations "from scratch" by providing a model formula,a data frame holding the predictor variables, and a listcontaining the values of the model parameters:see?simulate.merMod. (Github issue #115)VarCorr.merModobjects now have anas.data.framemethod, converting the list of matrices to a moreconvenient form for reporting and post-processing. (Github issue #129)
MINOR USER-VISIBLE CHANGES
results of
fitted(),predict(),andresiduals()now havenames in all cases (previously results were unnamed, ornamed only when predicting from new data)the
anovamethod now has arefitargumentthat controls whether objects of classlmerModshould berefitted with ML before producing theanovatable.(Github issues #141, #165; contributed by Henrik Singmann.)the
printmethod forVarCorrobjectsnow has aformatterargument for finer controlof standard deviation and variance formatsthe
optinfoslot now stores slightly moreinformation, including the number of function evaluations($feval).dotplot.ranef.mernow adds titles to sub-plots by default,likeqqmath.ranef.mer
BUG FIXES
fittednow respectsna.actionsettings (Githubissue #149)confint(.,method="boot")now works when there areNAvalues in the original data set (Github issue #158)previously, the code stored the results (parameter values,residuals, etc.) based on thelast set of parametersevaluated, rather than the optimal parameters. These werenot always the same, but were almost always very close,but some previous results will change slightly(Github issue #166)
CHANGES IN VERSION 1.1-0
MINOR USER-VISIBLE CHANGES
when using the default
method="profile",confintnow returns appropriate upper/lower bounds(-1/1 for correlations, 0/Inf for standard deviations)rather thanNAwhen appropriate
BUG FIXES
in a previous development version,
ranefreturnedincorrect conditional variances (github issue #148). this isnow fixed
CHANGES IN VERSION 1.0-6 (2014-02-02)
BUG FIXES
prediction now works when new data have fewer factorlevels than are present in the original data (Github issue #143,reported by Rune Haubo)
the existence of a variable "new" in the global environmentwould mess
lme4up: reported athttp://stackoverflow.com/questions/19801070/error-message-glmer-using-r-what-must-be-a-character-string-or-a-function
CHANGES IN VERSION 1.0-5 (2013-10-24)
USER-VISIBLE CHANGES
confint.merModandvcov.merModarenow exported, for downstream package-author conveniencethe package now depends on Matrix >=1.1-0 and RcppEigen>=0.3.1.2.3
new
rename.responseoption forrefit(see BUGFIXES section)
BUG FIXES
eliminated redundant messages about suppressedfixed-effect correlation matrices when p>20
most inverse-link functions are now bounded whereappropriate by
.Machine$double.eps, allowing fittingof GLMMs with extreme parameter valuesmerModobjects created withrefitdid notwork withupdate: optionalrename.responseoption added torefit.merMod, to allowthis (but the default is stillFALSE, forback-compatibility) (reported by A. Kuznetsova)fixed buglet preventing on-the-fly creation of index variables,e.g.
y~1+(1|rownames(data))(reported by J. Dushoff)predictnow works properly forglmermodelswith basis-creating terms (e.g.poly,ns)step sizes determined from fixed effect coefficient standarderrors after first state of
glmerfitting are now bounded,allowing some additional models to be fitted
CHANGES IN VERSION 1.0-4 (2013-09-08)
BUG FIXES
refit()now works, again, with lists oflength 1, so that e.g.refit(.,simulate(.))works.(Reported by Gustaf Granath)getME(.,"ST")was returning a listcontaining the Cholesky factorizations that get repeated inLambda. But this was inconsistent with whatSTrepresents inlme4.0. This inconsistency has now been fixed andgetME(.,"ST")is now consistent with the definition of theSTmatrix inlme4.0. Seehttps://github.com/lme4/lme4/issues/111for moredetail. Thanks to Vince Dorie.Corrected order of unpacking of standarddeviation/correlation components, which affected resultsfrom
confint(.,method="boot"). (Reported by ReinholdKliegl)fixed a copying bug that made
refitML()modify the original model
CHANGES IN VERSION 1.0-1 (2013-08-17)
MINOR USER-VISIBLE CHANGES
check.numobs.*andcheck.numlev.*in(g)lmerControlhave been changed (from recent developmentversions) tocheck.nobs.*andcheck.nlev.*respectively, and the default values ofcheck.nlev.gtreq.5andcheck.nobs.vs.rankZhave been changed to"ignore"and"warningSmall"respectivelyin
(g)lmerControl, arguments to the optimizershould be passed as a list calledoptCtrl, rather thanspecified as additional (ungrouped) argumentsthe
postVarargument toranefhas beenchanged to the (more sensible)condVar("posterior variance"was a misnomer, "conditional variance" – short for "variance of theconditional mode" – is preferred)the
REformargument topredicthas been changedtoReFormfor consistencythe
tnamesfunction, briefly exported, has beenunexportedgetME(.,"cnms")addedprintmethod formerModobjects is now moreterse, and different fromsummary.merModthe
objectivemethod for therespModreference class now takes an optionalsigma.sqparameter(defaulting toNULL) to allow calculation of theobjective function with a residual variance different fromthe profiled value (Vince Dorie)
CHANGES IN VERSION 1.0-0 (2013-08-01)
MAJOR USER-VISIBLE CHANGES
Because the internal computational machinery has changed,results from the newest version of
lme4will not be numericallyidentical to those from previous versions. For reasonably well-defined fits, they will be extremely close (within numericaltolerances of 1e-4 or so), but for unstable or poorly-defined fitsthe results may change, and very unstable fits may fail when they(apparently) succeeded with previous versions. Similarly, some fitsmay be slower with the new version, although on average the newversion should be faster and more stable. More numericaltuning options are now available (see below); non-default settingsmay restore the speed and/or ability to fit a particular model withoutan error. If you notice significant or disturbing changes when fittinga model with the new version oflme4,please notify the maintainers.VarCorrreturns its results in the same format as before (as alist of variance-covariance matrices withcorrelationandstddevattributes, plus ascattribute giving the residual standarddeviation/scale parameter when appropriate), but prints them in adifferent (nicer) way.By default
residualsgives deviance (rather than Pearson)residuals when applied toglmerfits (a side effect of matchingglmbehaviour more closely).As another side effect of matching
glmbehaviour, reported log-likelihoods fromglmermodelsare no longer consistent with those from pre-1.0lme4,butare consistent withglm; seeglmerexamples.
MINOR USER-VISIBLE CHANGES
More use is made of S3 rather than S4 classes and methods: oneside effect is that the
nlmeandlme4packages are now much morecompatible; methods such asfixefno longer conflict.The internal optimizer has changed.
[gn]lmernow has anoptimizerargument;"Nelder_Mead"is the default for[n]lmer,while a combination of"bobyqa"(an alternative derivative-freemethod) and"Nelder_Mead"is the default forglmer. To use thenlminboptimizer as in the old version oflme4, you can useoptimizer="optimx"withcontrol=list(method="nlminb")(you willneed theoptimxpackage to be installed and loaded). SeelmerControlfor details.Families in GLMMs are no longer restricted to built-in/hard-coded families; any family described in
family, or following thatdesign, is usable (although there are some hard-coded families, whichwill be faster).[gn]lmernow produces objects of classmerModrather thanclassmeras before.the structure of the
Zt(transposed random effectdesign matrix) as returned bygetME(.,"Zt"), and thecorresponding order of the random effects vector(getME(.,"u")) have changed. To retrieveZtin the old format, usedo.call(Matrix::rBind,getME(.,"Ztlist")).the package checks input more thoroughly fornon-identifiable or otherwise problematic cases: see
lmerControlfor fine control of the test behaviour.
NEW FEATURES
A general-purpose
getMEaccessor method allowsextraction of a wide variety of components of a mixed-modelfit.getMEalso allows a vector of objects to be returned asa list of mixed-model components. This has been backported tobe compatible with older versions oflme4that still producemerobjects rather thanmerModobjects. However, backporting is incomplete;some objects are only extractable in newer versions oflme4.Optimization information (convergence codes, warnings, etc.)is now stored in an
@optinfoslot.bootMerprovides a framework for obtaining parameter confidenceintervals by parametric bootstrapping.plot.merModprovides diagnostic plottingmethods similar to those from thenlmepackage(although missingaugPred).A
predict.merModmethod gives predictions;it allows an effect-specific choice of conditional prediction or prediction at thepopulation level (i.e., with random effects set to zero).Likelihood profiling for
lmerandglmerresults (seelink{profile-methods}).Confidence intervals by likelihood profiling (default),parametric bootstrap, or Wald approximation (fixed effects only):see
confint.merModnAGQ=0, an option to do fast (but inaccurate) fitting of GLMMs.Using
devFunOnly=TRUEallows the user to extract a deviancefunction for the model, allowing further diagnostics/customization ofmodel results.The internal structure of [gn]lmer is now more modular, allowingfiner control of the different steps of argument checking; constructionof design matrices and data structures; parameter estimation; and constructionof the final
merModobject (see?modular).the
formula,model.frame, andtermsmethods return full versions (including random effect terms andinput variables) by default, but afixed.onlyargumentallows access to the fixed effect submodel.
EXPERIMENTAL FEATURES
glmer.nbprovides an embryonic negativebinomial fitting capability.
STILL NON-EXISTENT FEATURES
Adaptive Gaussian quadrature (AGQ) is not available for multiple and/ornon-scalar random effects.
Posterior variances of conditional models for non-scalar random effects.
Standard errors for
predict.merModresults.Automatic MCMC sampling based on the fit turns out to be very difficultto implement in a way that is really broadly reliable and robust;
mcmcsampwill not be implemented in the near future. Seepvaluesfor alternatives."R-side" structures (within-block correlation and heteroscedasticity) arenot on the current timetable.
BUG FIXES
In a development version, prior weights were not being used properly inthe 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 penalizediteratively reweighted least squares algorithm was not working, butthis is now fixed.
In a development version, square
RZXmatrices would lead to apwrssUpdate did not converge in 30 iterationserror. This has been fixedby adding an extra column of zeros toRZX.
DEPRECATED AND DEFUNCT
Previous versions of
lme4providedthemcmcsampfunction, which efficiently generateda Markov chain Monte Carlo sample from the posteriordistribution of the parameters, assuming flat (scaledlikelihood) priors. Due to difficulty in constructing aversion ofmcmcsampthat was reliable even incases where the estimated random effect variances werenear zero (e.g.https://stat.ethz.ch/pipermail/r-sig-mixed-models/2009q4/003115.html),mcmcsamphas been withdrawn (or more precisely,not updated to work withlme4versions >=1.0).Calling
glmerwith the defaultgaussianfamilyredirects tolmer, but this is deprecated(in the futureglmer(...,family="gaussian")mayfit a LMM using the penalized iteratively reweighted least squaresalgorithm). Please calllmerdirectly.Calling
lmerwith afamilyargument redirectstoglmer; this is deprecated. Please callglmerdirectly.
CHANGES IN VERSION 0.999375-16 (2008-06-23)
MAJOR USER-VISIBLE CHANGES
The underlying algorithms and representations for all themixed-effects models fit by this package have changed - forthe better, we hope. The class "mer" is a commonmixed-effects model representation for linear, generalizedlinear, nonlinear and generalized nonlinear mixed-effectsmodels.
ECME iterations are no longer used at all, nor are analyticgradients. Components named 'niterEM', 'EMverbose', or'gradient' can be included in the 'control' argument tolmer(), 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() isdeprecated. Use the 'REML = FALSE' in lmer() to obtain MLestimates. Selection of AGQ in glmer() and nlmer() will becontrolled by the argument 'nAGQ', when completed.
NEW FEATURES
The representation of mixed-effects models has beendramatically changed to allow for smooth evaluation of theobjective as the variance-covariance matrices for the randomeffects approach singularity. Beta testers found thisrepresentation to be more robust and usually faster thanprevious versions of lme4.
The mcmcsamp function uses a new sampling method for thevariance-covariance parameters that allows recovery fromsingularity. The update is not based on a sample from theWishart distribution. It uses a redundant parameterrepresentation and a linear least squares update.
CAUTION: Currently the results from mcmcsamp look peculiar andare probably incorrect. I hope it is just a matter of myomitting a scaling factor but I have seen patterns such asthe parameter estimate for some variance-covariance parametersbeing the maximum value in the chain, which is highlyunlikely.
The 'verbose' argument to lmer(), glmer() and nlmer() can beused instead of 'control = list(msVerbose = TRUE)'.