This is the repo for the new lmerTest package, the old package is available here.
Main features
The lmerTest package provides p-values in type I, II or III anova and summary tables for linear mixed models (lmer model fits cf. lme4) via Satterthwaite’s degrees of freedom method; a Kenward-Roger method is also available via the pbkrtest package. Model selection and assessment methods include step, drop1, anova-like tables for random effects (ranova), least-square means (LS-means; ls_means) and tests of linear contrasts of fixed effects (contest).
Citation
To cite lmerTest in publications use:
Kuznetsova A., Brockhoff P.B. and Christensen R.H.B. (2017). “lmerTest Package: Tests in Linear Mixed Effects Models.” Journal of Statistical Software, 82(13), pp. 1–26. doi: 10.18637/jss.v082.i13.
Corresponding BibTeX entry:
Discovered a bug?
Please raise a new issue! Preferably add code that illustrates the problem using one of the datasets from lmerTest.
Installation
Basically there are two options for installing lmerTest:
- Released (stable version) from CRAN: in R run
install.packages("lmerTest"). - Development version from GitHub: in R run
remotes::install_github("runehaubo/lmerTestR")
If you don’t have the remotes package, you will have to install it first using install.packages("remotes") for this to work.
If you haven’t already installed a previous version of lmerTest you need to also install dependencies (other packages that lmerTest depends on and requires you to install to function properly). We recommend that you install lmerTest from CRAN (using install.packages("lmerTest")) before installing from GitHub as described above.
An alternative is to use
remotes::install_github("runehaubo/lmerTestR", dependencies=TRUE)
but that may require you to install some dependent packages from source (which only works if you have the correct compilers installed and set up correctly); installing the pre-compiled packages from CRAN is usually easier.