anova.psem | R Documentation |
Compute analysis of variance table for one or more structural equation models.
## S3 method for class 'psem'
anova(object, ..., digits = 3, anovafun = "Anova")
object |
a |
... |
additional objects of the same type |
digits |
number of digits to round results. Default is 3 |
anovafun |
The function used for ANOVA. Defaults to |
Additional models will be tested against the first model using a Chi-squared difference test.
an F, LRT, or other table for a single model, or a list of comparisons between multiple models
Jon Lefcheck <lefcheckj@si.edu>, Jarrett Byrnes <jarrett.byrnes@umb.edu>
Anova
data(keeley)
mod1 <- psem(
lm(rich ~ cover, data = keeley),
lm(cover ~ firesev, data = keeley),
lm(firesev ~ age, data = keeley),
data = keeley
)
# get type II Anova
anova(mod1)
# conduct LRT
mod2 <- psem(
lm(rich ~ cover, data = keeley),
lm(cover ~ firesev, data = keeley),
age ~ 1,
data = keeley
)
anova(mod1, mod2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.