Description Usage Arguments Details Value See Also Examples
View source: R/nauf.merMod-class-generic.R
Obtain an anova table for a nauf.lmerMod or
nauf.glmerMod model. Currently only Type III tests
are supported.
1 2 3 4 5 6 7 8 9 | ## S3 method for class 'nauf.lmerMod'
anova(object, ..., refit = TRUE, model.names = NULL,
method = c("lme4", "S", "KR", "LRT", "PB", "nested-KR"),
test_intercept = FALSE, args_test = NULL)
## S3 method for class 'nauf.glmerMod'
anova(object, ..., refit = TRUE, model.names = NULL,
method = c("lme4", "LRT", "PB"), test_intercept = FALSE,
args_test = NULL)
|
object |
A |
... |
Additional |
refit |
For the |
model.names |
For the |
method |
The method for calculating p-values. See 'Details'. |
test_intercept |
For all methods besides |
args_test |
For methods |
There are six methods of p-value calculation which are supported:
The default method. See anova.merMod.
nauf.lmerMod models only. Computes F-tests using the
Satterthwaite approximation of denominator degrees of freedom,
implemented with calcSatterth.
nauf.lmerMod models only. If object was fit with
maximum likelihood (ML), then the model is refit with restricted
maximum likelihood (REML) first. Then computes F-tests using the
Kenward-Roger approximation of denominator degrees of freedom,
implemented with Anova.merMod.
nauf.lmerMod models only. If object was fit
with maximum likelihood (ML), then the model is refit with
restricted maximum likelihood (REML) first. Then for each fixed
effects term, a restricted nested model is fit lacking only that fixed
effects term, and F-tests are computed using the Kenward-Roger
approximation of denominator degrees of freedom,
implemented with KRmodcomp. The full model and
restricted models are returned along with the anova table, similar to
mixed.
If object is a nauf.lmerMod fit with
REML, it is first refit with ML. Then restricted models
are fit as in the nested-KR method, and Chi-squared (likelihood
ratio) tests are computed. The full model and restricted models are
returned along with the anova table, similar to
mixed.
If object is a nauf.lmerMod fit with
REML, it is first refit with ML. Then likelihood ratios are
computed as for the LRT method, and p-values for the likelihood
ratios are computed using parametric bootstrapping, implemented with
PBmodcomp. The full model and restricted models
are returned along with the anova table, similar to
mixed.
The object returned depends on the method, and has class
nauf.mer.anova. For the lme4,
S, and KR methods, it is an anova table.
For the nested-KR, PB, and LRT methods,
a list with the anova table and restricted models is returned (similar
to the output of mixed).
nauf.lmerMod and
nauf.glmerMod classes;
anova.merMod for the lme4 method;
Anova.merMod for the KR method;
calcSatterth for the S method;
mixed for the nested-KR, LRT, and
PB methods; KRmodcomp for the
nested-KR method; PBmodcomp for the
PB method.
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 | dat <- droplevels(subset(plosives, voicing == "Voiceless"))
dat$spont[dat$dialect == "Valladolid"] <- NA
sobj <- standardize(cdur ~ dialect * spont + (1 | speaker) + (1 | item), dat)
mod <- nauf_lmer(sobj$formula, sobj$data)
## Not run:
# lme4 method anova table
anova(mod)
# anova table using Satterthwaite approximation
anova(mod, method = "S")
# anova table using Kenward-Roger approximation
anova(mod, method = "KR")
# list with restricted models and Kenward-Roger table
anova(mod, method = "nested-KR")
# list with restricted models and parametric bootstrap table
# model is first refit with maximum likelihood
anova(mod, method = "PB")
# list with restricted models and likelihood ratio test table
# model is first refit with maximum likelihood
anova(mod, method = "LRT")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.