"rma.uni"
or "rma.mv"
, the function provides a full versus reduced model comparison in terms of model fit statistics and a likelihood ratio test. When a single model is specified, a Wald-type test of one or more model coefficients or linear combinations thereof is carried out.
"anova"(object, object2, btt, L, digits, ...)
"rma.uni"
or "rma.mv"
."rma.uni"
or "rma.mv"
. See Details."anova.rma"
. When a single model is specified, the object is a list containing the following components:
NA
for "rma.mv"
objects.NA
for "rma.mv"
objects.NA
for fixed-effects models, if the amount of heterogeneity in the reduced model is equal to zero, or for "rma.mv"
objects. This can be regarded as a pseudo R² statistic (Raudenbush, 2009). Note that the value may not be very accurate unless $k$ is large (Lopez-Lopez et al., 2014).print.anova.rma
function.
In particular, for a fixed- or random-effects model (i.e., a model without moderators), this is just the test of the single coefficient of the model. For models including moderators, an omnibus test of all the model coefficients is conducted that excludes the intercept (the first coefficient) if it is included in the model. If no intercept is included in the model, then the omnibus test includes all of the coefficients in the model including the first.
Alternatively, one can manually specify the indices of the coefficients to test via the btt
argument. For example, with btt=c(3,4)
, only the third and fourth coefficient from the model would be included in the test (if an intercept is included in the model, then it corresponds to the first coefficient in the model).
Instead, one can also specify one or multiple linear combinations of the coefficients in the model that should be tested to be zero via the L
argument. If given as a matrix, its rows define the linear combinations to be tested. If the matrix is of full rank, an omnibus Wald-type test of all linear combinations is also provided.
When specifying two models for comparison, the function provides a likelihood ratio test comparing the two models. The two models must be based on the same set of data, must be of the same class, and should be nested for the likelihood ratio test to make sense. Note that likelihood ratio tests are not meaningful when using REML estimation and the two models have different fixed effects.
Huizenga, H. M., Visser, I., & Dolan, C. V. (2011). Testing overall and moderator effects in random effects meta-regression. British Journal of Mathematical and Statistical Psychology, 64, 1--19.
Lopez-Lopez, J. A., Marin-Martinez, F., Sanchez-Meca, J., Van den Noortgate, W., & Viechtbauer, W. (2014). Estimation of the predictive power of the model in mixed-effects meta-regression: A simulation study. British Journal of Mathematical and Statistical Psychology, 67, 30--48.
Raudenbush, S. W. (2009). Analyzing effect sizes: Random effects models. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta-analysis (2nd ed., pp. 295--315). New York: Russell Sage Foundation.
Viechtbauer, W. (2007). Hypothesis tests for population heterogeneity in meta-analysis. British Journal of Mathematical and Statistical Psychology, 60, 29--60.
Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.
rma.uni
, print.anova.rma
### load BCG vaccine data
data(dat.bcg)
### calculate log relative risks and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
### random-effects model
res1 <- rma(yi, vi, data=dat, method="ML")
### mixed-effects model with two moderators (absolute latitude and publication year)
res2 <- rma(yi, vi, mods = ~ ablat + year, data=dat, method="ML")
### Wald-type test of the two moderators
anova(res2)
### alternative way of specifying the same test
anova(res2, L=rbind(c(0,1,0), c(0,0,1)))
### corresponding likelihood ratio test
anova(res1, res2)
### test of a linear combination
anova(res2, L=c(1,35,1970))
Run the code above in your browser using DataLab