Description Usage Arguments Details References Examples
Methods for Function anova
in Package lmerTest
1 2 3 |
object |
object of class "merModLmerTest" |
... |
object of class "merModLmerTest". Then the model comparison statistisc will be calculated |
ddf |
By default the Satterthwaite's approximation to degrees of freedom is calculated. If ddf="Kenward-Roger", then the Kenward-Roger's approximation is calculated using |
type |
type of hypothesis to be tested. Could be type=3 or type=2 or type = 1 (The definition comes from SAS theory) |
According to (Goodnight, J.H. 1976) the behaviour of the type 3 hypothesis is not fully studied for the situations with missing cells (where observations are missing at some factor-level combination). A warning is returned in such cases.
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 | #import lmerTest package
library(lmerTest)
m.ham <- lmer(Informed.liking ~ Product*Information*Gender
+ (1|Consumer), data = ham)
# type 3 anova table with denominator degrees of freedom
# calculated based on Satterthwaite's approximation
anova(m.ham)
# type 1 anova table with denominator degrees of freedom
# calculated based on Satterthwaite's approximation
## Not run:
anova(m.ham, type = 1)
## End(Not run)
# type3 anova table with additional F statistics and denominator degrees of freedom
# calculated based on Kenward-Roger's approximation
if(require(pbkrtest))
anova(m.ham, ddf = "Kenward-Roger")
## Not run:
# anova table, that is returned by lme4 package
anova(m.ham, ddf = "lme4")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.