Tests in Linear Mixed Effects Models

Different kinds of tests for linear mixed effects models as implemented in 'lme4' package are provided. The tests comprise types I - III F tests for fixed effects, LR tests for random effects. The package also provides the calculation of population means for fixed factors with confidence intervals and corresponding plots. Finally the backward elimination of non-significant effects is implemented.



  • included citation info for JSS


  • lsmeans and difflsmeans are now deprecated functions. Changed the names to lsmeansLT and dlsmeansLT
  • changed the maintainer field


  • changed the message of identifiability to the more appropriate one


  • removed lmerTestFunctions.R and restructured the package. added calcSatterth(model, L) for calculating Satterthwaite's approximation for a specified L matrix


  • envir.R failed with the newest version of lme4. Changed the code to pass the check. TODO: remove updating the model


  • changes in general summary function. callNextMethod changed to as(model, "lmerMod)


  • updated according to comments from CRAN

2.0-24 changes:

  • cleaned the code

2.0-23 changes:

  • hessian and grad changed to mygrad and myhess (deriv.R functions of Rune)
  • plots use ggplot2
  • look for previous changes in R-Forge

2.0-11 changes:

  • elimRandEffs deleted. now the rand table contains all the information

2.0-9 changes:

  • fixed.calc option is added to step function
  • elimRand effs changed: random effects that are 1 approx to 1e-6 are eliminated
  • las=2 in barplots: verical axis names contrast with the name "l" changed to "l.lmerTest.private.contrasts"

2.0-8 changes:

  • throws error for lsmeans, difflsmeans, rand and step functions if the model does not inherit lmerMod class

2.0-7 changes:

  • in utils calcSatterth changed: solve of 0 dim matrix now catches in tryCatch - example MAMex.R in tests is added to check the bug
  • messages are printed if some computational errors occurr in anova or summary and the ones from lme4 are returned (bugSummary.R for testing)

2.0.6 changes:

  • added a number of tests in the tests folder and inst/datasets for the testing data sets - will not be included in the R-forge nor CRAN (for a moment)
  • model is not updated automatically to REML (tests for random effects are ML!)
  • man functions updated

2.0.5 changes:

  • fixed bug from Ben - summary(model, "lme4") changed to summary(model, ddf="lme4")
  • fixed bug for summary from Cyrus
  • added in manual notes regarding random coefficient models simplification
  • Rune changed solve to chol2inv in lmerTestFunctions.R
  • changed updateModel function so that the bugs with the environmentgs are solved

2.0.4 new:

  • rewritten rand table elimination
  • added elimrand.R

Modifications in lmerTest 2.0.1

  • The elim.num column now has KEEP instead of 0
  • X'X deficiancy was fixed by Rune, lmerTest was fixed accordingly

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0-36 by Per Bruun Brockhoff, 4 months ago

Browse source code at https://github.com/cran/lmerTest

Authors: Alexandra Kuznetsova [aut], Per Bruun Brockhoff [aut, ths, cre], Rune Haubo Bojesen Christensen [aut]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports plyr, MASS, Hmisc, ggplot2

Depends on Matrix, stats, methods, lme4

Suggests pbkrtest, nlme, estimability

Imported by EMAtools, StroupGLMM, VetResearchLMM, afex, agriTutorial, clickR, nauf, pamm, psycho, r2glmm, tableone, voxel.

Suggested by ARTool, emmeans, groupdata2, hamlet, languageR, lavaSearch2, lsmeans, neuropsychology, powerlmm, simr, sjPlot, sjstats, standardize.

Enhanced by RLRsim.

See at CRAN