Viechtbauer 2010 - Conducting Meta-Analyses in R with the metafor Package - Overview

Summary

Viechtbauer (2010) describes the metafor R package, which fits fixed-, random- and mixed-effects meta-analysis models (including meta-regression with continuous and categorical moderators) as special cases of the heteroscedastic linear mixed model with known sampling variances. The paper walks through effect-size computation, seven estimators, Wald/Knapp-Hartung/likelihood-ratio/permutation inference, diagnostics, publication-bias tools and a 13-study BCG vaccine example whose random-effects estimate is (relative risk 0.49, 95% CI 0.34 to 0.70) with .

Overview

Research question. Existing R packages (meta, rmeta) offered only limited moderator analysis and a single heterogeneity estimator (DerSimonian-Laird). How can a general-purpose package let analysts fit the full family of fixed, random and mixed (meta-regression) models, test and diagnose them, and probe publication bias, all from one interface?

Contribution. A package (v1.4-0 at publication) whose core function rma.uni() fits , in two steps: estimate (HS, HE, DL, SJ, ML, REML or EB), then weighted least squares with . Around it sit escalc() (effect sizes), forest/funnel/radial/qqnorm, influence/leave1out/cumul, ranktest/regtest/trimfill, anova (LRT), permutest and blup.

Key results (BCG data, log relative risk).

  • Random effects (REML): , SE 0.1798; ; ; ; .
  • Meta-regression on absolute latitude: per degree (); residual (65% of heterogeneity explained with latitude and year).
  • Knapp-Hartung and permutation tests are more conservative and have nearer-nominal Type I error.

Why it matters here. The metafor model is the frequentist counterpart of the Bayesian normal-normal hierarchical model in Roever 2020 - Bayesian Random-Effects Meta-Analysis with bayesmeta - Overview, and its Knapp-Hartung option is the HKSJ method evaluated in IntHout 2014 - HKSJ vs DerSimonian-Laird Random-Effects Meta-Analysis - Overview.

Main Content

Source Map

Paper section (pages)ContentCovered in
1 Introduction (pp. 1-3)Definition of meta-analysis, software landscape, scopethis note; Viechtbauer 2010 - Technical Details, Validation and Package Comparison
2.1 Random-effects model (p. 3)Eq. (1)-(2)Viechtbauer 2010 - Fixed, Random and Mixed-Effects Models
2.2 Mixed-effects model (pp. 3-4)Eq. (3)Viechtbauer 2010 - Fixed, Random and Mixed-Effects Models
2.3 Fixed vs random/mixed (pp. 4-5)Eq. (4)-(5), conditional vs unconditional inferenceViechtbauer 2010 - Fixed, Random and Mixed-Effects Models
2.4 Model fitting (p. 5)Two-step fitting, estimator list, Wald tests, Q-test, BLUPsViechtbauer 2010 - tau2 Estimators, Q-Test and Heterogeneity Statistics
3.1 Calculating outcome measures (pp. 6-10)escalc(), 2x2, MD/SMD, correlations, proportions, zero cellsViechtbauer 2010 - Effect Size Measures and escalc
3.2 Example (pp. 9-11)BCG data, dat.bcg, formula interfaceViechtbauer 2010 - BCG Vaccine Worked Example; Viechtbauer 2010 - Effect Size Measures and escalc
3.3 Fitting models (pp. 11-13)rma.uni() arguments, mods, btt, knhaViechtbauer 2010 - Fitting Models with rma, Moderators and Knapp-Hartung
3.4 Example: RE, mixed, categorical, KH (pp. 13-21)Figs. 1-2, outputsViechtbauer 2010 - BCG Vaccine Worked Example
3.5 Fitted/predicted values, residuals (pp. 21-23)Table 1, predict, rstudentViechtbauer 2010 - Residuals, Influence Diagnostics and Plots
3.5 Influence, leave-one-out (pp. 23-26)Fig. 3Viechtbauer 2010 - Residuals, Influence Diagnostics and Plots
3.5 Plots: forest, funnel, radial, Q-Q (pp. 26-29)Figs. 4-7Viechtbauer 2010 - Residuals, Influence Diagnostics and Plots
3.5 Funnel asymmetry tests, trim and fill (pp. 29-32)Fig. 8Viechtbauer 2010 - Publication Bias, Trim-and-Fill and Cumulative Meta-Analysis
3.5 Cumulative meta-analysis (pp. 32-33)Fig. 9Viechtbauer 2010 - Publication Bias, Trim-and-Fill and Cumulative Meta-Analysis
3.5 Fit statistics, LRT (pp. 33-34)fitstats, anovaViechtbauer 2010 - LRT, Permutation Tests, BLUPs and Model Fit
3.5 Permutation tests (pp. 34-37)Fig. 10Viechtbauer 2010 - LRT, Permutation Tests, BLUPs and Model Fit
3.5 BLUPs (pp. 37-38)Fig. 11Viechtbauer 2010 - LRT, Permutation Tests, BLUPs and Model Fit
3.6 Technical details (pp. 38-40)Fisher scoring, truncation, assumptionsViechtbauer 2010 - Technical Details, Validation and Package Comparison; Viechtbauer 2010 - tau2 Estimators, Q-Test and Heterogeneity Statistics
4 Validation (p. 40)Cross-software checksViechtbauer 2010 - Technical Details, Validation and Package Comparison
5 Comparison of packages (pp. 40-42)Table 2Viechtbauer 2010 - Technical Details, Validation and Package Comparison
6 Conclusions (p. 42)Mantel-Haenszel, Peto, independence caveatViechtbauer 2010 - Technical Details, Validation and Package Comparison
References (pp. 43-48)about 70 citationsViechtbauer 2010 - Technical Details, Validation and Package Comparison (key-reference map)

Headline numbers

Analysis (BCG, log RR)EstimateSource
RE model, REML (95% CI -1.0669, -0.3622); RR 0.49 (0.34, 0.70)Sec. 3.4
(SE)0.3132 (0.1664); Sec. 3.4
, 92.22%, 12.86Sec. 3.4
Q test, Sec. 3.4
Mixed: latitude + year, residual , Sec. 3.4
LRT for latitude, , 87.73% of explainedSec. 3.5
Trim and fill (FE)4 missing studies, FE estimate -0.2910Sec. 3.5

Examples

The full BCG analysis, with independent Python reproduction of , , , , BLUPs and the Knapp-Hartung meta-regression, is in Viechtbauer 2010 - BCG Vaccine Worked Example.

Connections

See Also