anova | R Documentation |
It compares nested models with the likelihood ratio
statistic from various objects. It is a wrapper of mxCompare
.
## S3 method for class 'wls'
anova(object, ..., all=FALSE)
## S3 method for class 'meta'
anova(object, ..., all=FALSE)
## S3 method for class 'meta3LFIML'
anova(object, ..., all=FALSE)
## S3 method for class 'reml'
anova(object, ..., all=FALSE)
## S3 method for class 'osmasem'
anova(object, ..., all=FALSE)
## S3 method for class 'osmasem2'
anova(object, ..., all=FALSE)
## S3 method for class 'mxsem'
anova(object, ..., all=FALSE)
object |
An object or a list of objects of various classes. It will be passed to the
|
... |
An object or a list of objects of various classes. It will be passed to the
|
all |
A Boolean value on whether to compare all bases with all
comparisons. It will be passed to the |
A table of comparisons between the models in base and comparison.
When the objects are class wls
, the degrees
of freedom in the base and comparison models are incorrect, while the degrees of
freedom of the difference between them is correct. If users want to
obtain the correct degrees of freedom in the base and comparison
models, they may individually apply the summary
function on
the base and comparison models.
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
## Test the significance of a predictor with likelihood ratio test
## Model0: No predictor
model0 <- meta(y=yi, v=vi, data=Hox02, model.name="No predictor")
## Model1: With a predictor
model1 <- meta(y=yi, v=vi, x=weeks, data=Hox02, model.name="One predictor")
## Compare these two models
anova(model1, model0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.