Chapter 4 Meta-analysis in R
Learning outcomes
- Format data for meta-analyses in R.
- Explore the capacity of the R package metafor.
- Pilot statistics for two datasets.
Context
Try out these ideas in a meta-analysis. Securing derived data to replicate an existing synthesis was not common historically, but it is now becoming increasingly viable with open science influences on these contributions. How to do a meta-analysis is well described in the peer-reviewed literature (Field and Gillett 2010) and numerous books to name a few (Koricheva, Gurevitch, and Mengersen 2013). Doing meta-analyses using the R programming language is similarly well articulated - particularly from the documentation associated with the package metafor (Viechtbauer 2017). There are no bad choices in R with well over 100 packages associated with and supporting meta-analyses conservatively listed at 151 packages. The output of Stata (an application specific to many medical meta-analyses), the R package meta, and metafor were virtually identical in several test cases (C. J. Lortie and Filazzola 2020). Ten criteria are proposed in contrasting R packages for this task specifically, but at the current time, metafor is the most commonly used and extensively documented. Hence, consider tackling the challenges here with this package as a robust starting point and entry in meta-statistics.
The 5 primary steps for meta-analyses in R.
- Secure primary data.
- Build conceptual model for factors, reponses, and moderators.
- Calculate effect size(s).
- Fit appropriate meta-model.
- Explore significance levels, heterogeneity, and bias.
Challenge
- Download a dataset and explore applying metafor to the data.
- Check the published report and examine whether you reached reasonably similar conclusions.
- Repeat with a second example from another discipline and consider testing another metafor function.
Products
- Two R scripts for meta-analysis.
- A sense of data structures needed for meta-analyses in the R package metafor.
Reflection questions
- Did the analytical process differ significantly from primary-data workflows?
- Do meta-models in R sufficiently report outcomes to assess strength of evidence?
- What other steps would be an appropriate addendum to this process?
- What relational or qualitative elements might be worthwhile to consider adding to meta-analyses and their interpretation for stronger evidence framing and reuse?