Contents
What does lmerTest do?
The lmerTest package extends the ‘lmerMod’ class of the lme4 package, by overloading the anova and summary functions by providing p values for tests for fixed effects. We have also implemented the construction of Type I–III ANOVA tables.
Why no p-values in lme4?
This is because in lme4 the output of linear mixed models provides t-values but no p-values. The primary motivation for this omission is that in linear mixed models it is not at all obvious what the appropriate denominator degrees of freedom to use are, except perhaps for some simple designs and nicely balanced data.
What package has lmerTest?
lmerTest: Tests in Linear Mixed Effects Models A Kenward-Roger method is also available via the pbkrtest package. Model selection methods include step, drop1 and anova-like tables for random effects (ranova).
How can I get p values from lmer?
You could use the package lmerTest. You just install/load it and the lmer models get extended. So e.g. would give you results with p-values. If p-values are the right indication is a little bit disputed, but if you want to have them, this is the way to get them.
When to use REML or false in lmer?
When should it be FALSE? To cite the author: “It’s generally good to use REML, if it is available, when you are interested in the magnitude of the random effects variances, but never when you are comparing models with different fixed effects via hypothesis tests or information-theoretic criteria such as AIC.”
Can a linear mixed model be included in lmer?
For the user of linear mixed effect models, such transparency is a boon. To illustrate, the figure below shows the output after loading the lmerTest package. A linear mixed model analyses using lmer will automatically include p values computed via the Satterthwaite approximation.
Why do you use LME instead of lmer?
because you don’t need any of the stuff that lmer offers (higher speed, handling of crossed random effects, GLMMs …). lme should give you exactly the same coefficient and variance estimates but will also compute df and p-values for you (which do make sense in a “classical” design such as you appear to have).