metaSEM (version 1.3.1)

anova: Compare Nested Models with Likelihood Ratio Statistic

Description

It compares nested models with the likelihood ratio statistic from various objects. It is a wrapper of mxCompare.

Usage

# S3 method for wls
anova(object, ..., all=FALSE)
# S3 method for meta
anova(object, ..., all=FALSE)
# S3 method for meta3LFIML
anova(object, ..., all=FALSE)
# S3 method for reml
anova(object, ..., all=FALSE)
# S3 method for osmasem
anova(object, ..., all=FALSE)

Value

A table of comparisons between the models in base and comparison.

Arguments

object

An object or a list of objects of various classes. It will be passed to the base argument in mxCompare.

...

An object or a list of objects of various classes. It will be passed to the comparison argument in mxCompare.

all

A Boolean value on whether to compare all bases with all comparisons. It will be passed to the all argument in mxCompare.

Author

Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>

Examples

Run this code
## 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) 

Run the code above in your browser using DataLab