/metafor

A Meta-Analysis Package for R

Primary LanguageR

metafor: A Meta-Analysis Package for R

Build Status Code Coverage CRAN Version devel Version Monthly Downloads Total Downloads

Description

The metafor package is a comprehensive collection of functions for conducting meta-analyses in R. The package includes functions to calculate various effect sizes or outcome measures, fit fixed-, random-, and mixed-effects models to such data, carry out moderator and meta-regression analyses, and create various types of meta-analytical plots (e.g., forest, funnel, radial, L'Abbé, Baujat, GOSH plots). For meta-analyses of binomial and person-time data, the package also provides functions that implement specialized methods, including the Mantel-Haenszel method, Peto's method, and a variety of suitable generalized linear (mixed-effects) models (i.e., mixed-effects logistic and Poisson regression models). Finally, the package provides functionality for fitting meta-analytic multivariate/multilevel models that account for non-independent sampling errors and/or true effects (e.g., due to the inclusion of multiple treatment studies, multiple endpoints, or other forms of clustering). Network meta-analyses and meta-analyses accounting for known correlation structures (e.g., due to phylogenetic relatedness) can also be conducted.

Package Website

The metafor package website can be found at http://www.metafor-project.org. On the website, you can find:

Documentation

A good starting place for those interested in using the metafor package is the following paper:

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1-48. https://www.jstatsoft.org/v36/i03/.

In addition to reading the paper, carefully read the package intro and then the help pages for the escalc and the rma.uni functions (or the rma.mh, rma.peto, rma.glmm, rma.mv functions if you intend to use these methods). The help pages for these functions provide links to many additional functions, which can be used after fitting a model. You can also read the entire documentation online at https://wviechtb.github.io/metafor/ (where it is nicely formatted, equations are shown correctly, and the output from all examples is provided).

Installation

The current official (i.e., CRAN) release can be installed directly within R with:

install.packages("metafor")

After installing the remotes package with install.packages("remotes"), the development version of the metafor package can be installed with:

remotes::install_github("wviechtb/metafor")

This builds the package from source based on the current version on GitHub.

Meta

The metafor package was written by Wolfgang Viechtbauer. It is licensed under the GNU General Public License. For citation info, type citation(package='metafor') in R. To report any issues or bugs or to suggest enhancements to the package, please go here.