knitr::opts_chunk$set(collapse = TRUE,
  comment = "#>",
  fig.width = 7,
  fig.height = 3)

metameta: A Meta-meta-analysis Package for R

DOI Travis build status Lifecycle: experimental

Description

The metameta package is a collection of functions for meta-meta-analyses in R, which is useful for re-analyzing published meta-analysis. Functions are available to calculate the statistical power for each study in a meta-analysis, based on data that is typically reported in meta-analyses, and for creating a “Firepower” plot, which visualizes the median power of a meta-analysis assuming a range of true effect sizes.

Usage

Install the package

devtools::install_github("dsquintana/metameta")

Calculate power for studies included in a published meta-analysis.

The mapower_se function can calculate power for a range of "true" effect sizes: The reported summary effect size estimate and a range of effects from 0.1 to 1 (in increments of 0.1). Here, we're only showing the first 6 columns for the purposes of illustration, although the function calculates power for 11 true effect sizes in total. We're also making our calculations based on reported effect sizes and standard errors

library(metameta)
library(dplyr)
power_ooi <- mapower_se(dat = dat_ooi, observed_es = 0.178, name = "ooi et al 2017")
power_ooi_dat <- power_ooi$dat
power_ooi_dat <- power_ooi_dat %>% select(1:6) # Select first 6 columns
power_ooi_dat

We can also perform the same analysis using effect size and confidence interval data, using the mapower_ul function. As before, only a small selection of columns are printed for the purposes of demonstration.

power_keech <- mapower_ul(dat = dat_keech, observed_es = 0.08, name = "Keech et al 2017")
power_keech_dat <- power_keech$dat
power_keech_dat <- power_keech_dat %>% select(1:6) # Select first 6 columns
power_keech_dat

Create a Firepower plot

Sometimes it's useful to calculate the statistical power for a body of meta-analyses, which might be reported in the same article or across articles. Illustrating the power of individual studies from multiple meta-analyses can be difficult to interpret if there are many studies. An alternative is to illustrate the power per meta-analysis by calculating the mean power across studies. We can illustrate this with a "Firepower" plot. This plot visualizes the median power assuming the observed effect size in the meta-analysis is the true effect size as well as assuming a range of true effect sizes ranging from 0.1 to 1 (in increments of 0.1).

library(metameta)

### Calcuate median power for three meta-analyses
power_ooi <- mapower_se(dat = dat_ooi, observed_es = 0.178, name = "ooi et al 2017")
power_med_ooi <- power_ooi$power_median_dat

keech_power <- mapower_ul(dat = dat_keech, observed_es = 0.08, name = "Keech et al 2017")
power_med_keech <- keech_power$power_median_dat

power_bakermans_kranenburg <- 
  mapower_se(dat = dat_bakermans_kranenburg, observed_es = 0.32, 
             name = "Bakermans-Kranenburg et al 2013")
power_med_bakermans_kranenburg <- power_bakermans_kranenburg$power_median_dat

### Create a list
list_power <- list(power_med_ooi, power_med_keech, power_med_bakermans_kranenburg)

### Run firepower function
fp <- firepower(list_power)

### Create firepower plot
fp_plot <- fp$fp_plot
fp_plot


dsquintana/metameta documentation built on Oct. 14, 2022, 2:16 a.m.