
Last chance! 50% off unlimited learning
Sale ends in
It compares nested models with the likelihood ratio
statistic from either wls
, meta
, meta3X
or
reml
objects. It is a wrapper of mxCompare
.
# S3 method for wls
anova(object, …, all=FALSE)
# S3 method for meta
anova(object, …, all=FALSE)
# S3 method for meta3X
anova(object, …, all=FALSE)
# S3 method for reml
anova(object, …, all=FALSE)
A boolean value on whether to compare all bases with all
comparisons. It will be passed to the all
argument in
mxCompare
.
A table of comparisons between the models in base and comparison.
# NOT RUN {
## 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