Table of Contents
Tips and Notes
The links below point to pages illustrating various tips and notes that may be useful when working with the metafor package. In addition, some features of the package that may not be readily apparent from the documentation are explained in more detail.
Note: If an example does not work properly, try installing the development version of the metafor package as described here.
Data Preparation & Management
- Assembling Data for a Meta-Analysis of Standardized Mean Differences: An illustration of how a dataset for a meta-analysis of standardized mean differences (Cohen's d values) can be assembled/constructed from various pieces of information.
- Assembling Data for a Meta-Analysis of (Log) Odds Ratios: An illustration of how a dataset for a meta-analysis of (log) odds ratios can be assembled/constructed from various pieces of information.
Comparisons Between Different Functions, Models, and Software
- Linear Regression and the Mixed-Effects Meta-Regression Model: An illustration of the relationship between the linear regression model (fitted by the
lm()function) and the mixed-effects meta-regression model (fitted by the
- A Comparison of the rma.uni() and rma.mv() Functions: A comparison of the
rma.mv()functions for fitting equal- and random-effects models.
- A Comparison of the rma() and the lm(), lme(), and lmer() Functions: An illustration of the difference between the models fitted by the
rma()function and the models fitted by the
- Two-Stage Analysis versus Linear Mixed-Effects Models for Longitudinal Data: An illustration of two different approaches to analyzing longitudinal data: A two-stage analysis (which the
rma.mv()function can be used for) and linear mixed-effects models (e.g., using the
- Comparison of the Mantel-Haenszel Method in Different Software: A comparison of the results obtained with the Mantel-Haenszel method as implemented in metafor and other software.
- Hunter and Schmidt Method: A discussion of how one can conduct a meta-analysis according to the Hunter & Schmidt method with the metafor package.
- Conditional Logistic Regression for Paired Binary Data: An illustration of how to fit the conditional logistic regression model for paired binary data.
- Meta-Regression Models With or Without an Intercept: A discussion of what happens when we fit meta-regression models with or without an intercept.
- Interpreting Coefficients in Meta-Regression Models with (Log) Risk Ratios: A little tutorial on how to interpret the coefficients in a meta-regression model when using the log risk ratio as the outcome measure.
- Testing Factors and Linear Combinations of Parameters: An illustration of how to test factors and linear combinations of parameters in (mixed-effects) meta-regression models.
- Models with Multiple Factors and Their Interaction: An illustration of how to examine and conduct tests of models involving multiple factors and their interaction.
- Computing Adjusted Effects Based on Meta-Regression Models: A discussion of how to compute 'adjusted effects' based on meta-regression models.
- Difference Between the Omnibus Test and Tests of Individual Predictors: An illustration and discussion of the phenomenon where the result from the 'omnibus test' conflicts with that from tests of the individual predictors in a meta-regression model.
- Increasing $\tau^2$ When Adding Moderators: An illustration of the somewhat counterintuitive phenomenon of an increasing estimate of $\tau^2$ when adding moderators in a meta-regression model.
- Confidence Intervals for $R^2$ in Meta-Regression Models: An illustration of how to use bootstrapping to obtain a confidence interval for $R^2$ in meta-regression models.
- Comparing Estimates of Independent Meta-Analyses or Subgroups: An illustration of how to compare two estimates from two independent meta-analyses or subgroups of studies.
- Modeling Non-Linear Associations in Meta-Regression: An illustration of how to model non-linear associations in meta-regression using polynomial and restricted cubic spline models.
- Bootstrapping with Meta-Analytic Models: An example showing how to conduct parametric and non-parametric bootstrapping with meta-analytic models using the boot package.
- Model Selection using the glmulti and MuMIn Packages: An illustration of how to use the metafor package in combination with the glmulti and MuMIn packages for model selection and multimodel inference based on an information-theoretic approach.
- Multiple Imputation with the mice and metafor Packages: An illustration of how to do multiple imputation together with the mice and metafor packages.
Plots and Figures
- Handling Missing Data in Output/Figures: An illustration/discussion of how to show studies in figures and output that were actually excluded from model fitting due to missing data.
- Forest Plot with Exact Confidence Intervals: An illustration of how to create a forest plot that shows 'exact' confidence intervals for the observed outcomes of the individual studies.
- Forest Plot with Aggregated Values: An illustration of how to create a forest plot that shows aggregated estimates for studies that contribute multiple estimates to the analysis.
- $I^2$ for Multilevel and Multivariate Models: A discussion of how one can compute $I^2$-type statistics in multilevel and multivariate models.
- Weights in Models Fitted with the rma.mv() Function: A discussion of how weighting works in more complex models, such as those that can be fitted with the
- Specifying Inputs to the rma() Function: A discussion of how the inputs to the
rma()function should be specified (and how, on occasion, they have been incorrectly specified).
- Speeding Up Model Fitting: A discussion of some methods and strategies for speeding up model fitting with complex models.
- Convergence Problems with the rma() Function: A discussion and illustration of convergence problems that can rise when fitting random/mixed-effects (meta-regression) models with the