Learn R Programming

metafor (version 1.9-4)

anova.rma.uni: Likelihood Ratio and Wald-Type Tests for 'rma.uni' Objects

Description

For two (nested) models of class "rma.uni", 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 is carried out.

Usage

## S3 method for class 'rma.uni':
anova(object, object2, btt, digits, \dots)

Arguments

object
an object of class "rma.uni".
object2
an (optional) object of class "rma.uni". See Details.
btt
optional vector of indices specifying which coefficients to include in the Wald-type test. See Details.
digits
integer specifying the number of decimal places to which the printed results should be rounded (if unspecified, the default is to take the value from the object).
...
other arguments.

Value

  • An object of class "anova.rma.uni". When a single model is specified, the object is a list containing the following components:
  • QMtest statistic for the Wald-type test of model coefficients.
  • QMpp-value for the Wald-type test of model coefficients.
  • bttindices of the coefficients tested by the Wald-type test.
  • knumber of outcomes included in the model fitting.
  • pnumber of coefficients in the model (including the intercept).
  • mnumber of coefficients included in the Wald-type test of coefficients.
  • ...some additional elements/values.
  • When two models are specified, the object is a list containing the following components:
  • fit.stats.flog-likelihood, deviance, AIC, BIC, and AICc for the full model.
  • fit.stats.rlog-likelihood, deviance, AIC, BIC, and AICc for the reduced model.
  • p.fnumber of parameters in the full model.
  • p.rnumber of parameters in the reduced model.
  • LRTlikelihood ratio test statistic.
  • pvalp-value for the likelihood ratio test.
  • QE.ftest statistic for the test of (residual) heterogeneity from the full model.
  • QE.rtest statistic for the test of (residual) heterogeneity from the reduced model.
  • tau2.festimated latex{$\tau^2$}html{$\tau²$}text{$\tau^2$} value from the full model.
  • tau2.restimated latex{$\tau^2$}html{$\tau²$}text{$\tau^2$} value from the reduced model.
  • R2amount of (residual) heterogeneity in the reduced model that is accounted for in the full model. NA for fixed-effects models or if the amount of heterogeneity in the reduced model is equal to zero. This can be regarded as a pseudo latex{$R^2$}html{$R²$}text{$R^2$} statistic (Raudenbush, 2009).
  • ...some additional elements/values.
  • The results are formated and printed with the print.anova.rma.uni function.

Details

When a single model is specified, the function provides a Wald-type test of one or more model coefficients. 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). When specifying two models for comparison, the function provides a likelihood ratio test comparing the two models. The models must be based on the same set of data and should be nested for the likelihood ratio test to make sense.

References

Hardy, R. J., & Thompson, S. G. (1996). A likelihood approach to meta-analysis with random effects. Statistics in Medicine, 15, 619--629. 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. 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/.

See Also

rma.uni, print.anova.rma.uni

Examples

Run this code
### 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
res2 <- rma(yi, vi, data=dat, method="ML")

### mixed-effects model with two moderators (absolute latitude and publication year)
res1 <- rma(yi, vi, mods = ~ ablat + year, data=dat, method="ML")

### Wald-type test of the two moderators
anova(res1)

### corresponding likelihood ratio test
anova(res1, res2)

Run the code above in your browser using DataLab