Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2019 Nov;22(4):153-160.
doi: 10.1136/ebmental-2019-300117. Epub 2019 Sep 28.

How to perform a meta-analysis with R: a practical tutorial

Affiliations

How to perform a meta-analysis with R: a practical tutorial

Sara Balduzzi et al. Evid Based Ment Health. 2019 Nov.

Abstract

Objective: Meta-analysis is of fundamental importance to obtain an unbiased assessment of the available evidence. In general, the use of meta-analysis has been increasing over the last three decades with mental health as a major research topic. It is then essential to well understand its methodology and interpret its results. In this publication, we describe how to perform a meta-analysis with the freely available statistical software environment R, using a working example taken from the field of mental health.

Methods: R package meta is used to conduct standard meta-analysis. Sensitivity analyses for missing binary outcome data and potential selection bias are conducted with R package metasens. All essential R commands are provided and clearly described to conduct and report analyses.

Results: The working example considers a binary outcome: we show how to conduct a fixed effect and random effects meta-analysis and subgroup analysis, produce a forest and funnel plot and to test and adjust for funnel plot asymmetry. All these steps work similar for other outcome types.

Conclusions: R represents a powerful and flexible tool to conduct meta-analyses. This publication gives a brief glimpse into the topic and provides directions to more advanced meta-analysis methods available in R.

PubMed Disclaimer

Conflict of interest statement

Competing interests: None declared.

Figures

Figure 1
Figure 1
Printout of metabin function.
Figure 2
Figure 2
Forest plot showing the results of fixed effect and random effects meta-analysis (available case analysis).
Figure 3
Figure 3
Forest plot showing the subgroup analysis by presence of missing data (available case analysis).
Figure 4
Figure 4
Summary risk ratios according to different assumptions about mechanism of missingness.
Figure 5
Figure 5
Funnel plot and various methods to evaluate funnel plot asymmetry.

References

    1. Borenstein M, Hedges LV, Higgins JPT, et al. . Introduction to meta-analysis. Chichester: John Wiley & Sons, Ltd, 2009.
    1. Rothstein HR, Sutton AJ, Borenstein MH. Publication bias in meta-analysis: prevention, assessment and adjustments. Chichester, UK: John Wiley & Sons, 2005.
    1. Davey J, Turner RM, Clarke MJ, et al. . Characteristics of meta-analyses and their component studies in the Cochrane database of systematic reviews: a cross-sectional, descriptive analysis. BMC Med Res Methodol 2011;11:160. 10.1186/1471-2288-11-160 - DOI - PMC - PubMed
    1. R Core Team . R: a language and environment for statistical computing. Vienna: R Foundation for Statistical Computing; 2019. https://www.R-project.org
    1. StataCorp . Stata statistical software: release 16. College Station, TX: StataCorp LLC, 2019.