Description Details Author(s) References Examples
The package provides anova function, that gives data frame similar to what
gives lme4 package but with p
-values calculated from
F
statistics of types I - III hypotheses. There are two options for
denominator degrees of freedom of F
statistics: "Satterthwaite" and
"Kenward-Roger". The calculation of anova with Kenward-Roger's approximation
is based on function from pbkrtest package, the calculation of
Satterthwaite's approximation is based on SAS proc mixed theory (see reference).
The package also provides summary
function,
which gives the same as lme4 package summary function but with
p
-values and degrees of freedom added for the t
-test
(based on Satterthwaite approximation for denominator degrees of freedom).
The tests on random effects are performed using likelihood ratio tests.
Package: | lmerTest |
Type: | Package |
Version: | 1.0 |
Date: | 2012-01-10 |
License: | GPL |
The calculation of statistics for the fixed part was developed according to SAS Proc Mixed Theory (see reference).
Alexandra Kuznetsova <alku@dtu.dk>, Per Bruun Brockhoff, Rune Haubo Bojesen Christensen
Alexandra Kuznetsova, Per B. Brockhoff and Rune H.B. Christensen (2017) lmerTest Package: Tests in Linear Mixed Effects Models. Journal of Statistical Software, 82(13), 1–26. doi:10.18637/jss.v082.i13
SAS Technical Report R-101 1978 Tests of Hypotheses in Fixed-Effects Linear Models Copyright (C) (SAS Institute Inc., Cary, NC, USA)
Goodnight, J.H. 1976 General Linear Models Procedure (S.A.S. Institute, Inc.)
Schaalje G.B., McBride J.B., Fellingham G.W. 2002 Adequacy of approximations to distributions of test Statistics in complex mixed linear models
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## import lmerTest package
library(lmerTest)
## an object of class merModLmerTest
m <- lmer(Informed.liking ~ Gender+Information+Product +(1|Consumer), data=ham)
## gives summary of lmer object. The same as of class merMod but with
## additional p-values calculated based on Satterthwate's approximations
summary(m)
## anova table the same as of class merMod but with additional F statistics and
## and denominator degrees of freedom and
## p-values calculated based on Satterthwaite's approximations
anova(m)
## anova table the same as of class merMod but with additional F statistics and
## denominator degrees of freedom and
## p-values calculated based on Kenward-Roger's approximations
## Not run:
if(requireNamespace("pbkrtest", quietly = TRUE))
anova(m, ddf = "Kenward-Roger")
## End(Not run)
## anova table of class merMod
anova(m, ddf="lme4")
## backward elimination of non-significant effects of model m
st <- step(m)
plot(st)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.