firepower: Calculate the median study power for a meta-analysis and...

View source: R/firepower.R

firepowerR Documentation

Calculate the median study power for a meta-analysis and visualise this data using a Firepower plot

Description

Creates a dataset with median power and a firepower plot, which visualises the median power for a meta-analysis assuming the observed effect size in the meta-analysis is the true effect size and assuming a range of true effect sizes ranging from 0.1 to 1 in increments of 0.1. See 'Details'.

Usage

firepower(power_list, size = "medium", es = "Effect size")

Arguments

power_list

A list of dataframes with calculated power, derived from the "mapower_ul" or "mapower_se" functions. See 'Examples' for how to make a list.

size

The effect size range, as specified using the mapower_se() or mapower_ul() functions, which created the 'power_list' dataframe or dataframes. The default is a medium range is 0.1 to 1, in increments of 0.1. Other options include a "small" range (0.05 to 0.5 in increments of 0.05) and a "large" range (0.25 to 2.5 in increments of 0.25).

es

An optional string for the name of the effect size for the plot (e.g., "Hedges g"). The default string is "Effect size".

Details

The true effect size

For the purposes of power analysis a "true" effect size needs to be specified. However, the true effect size is unknown when testing hypotheses and reported summary effect sizes are typically inflated. Thus, Firepower plots implements two alternative categories for a true effect for the purposes of power analysis: The observed summary effect size estimate reported in the meta-analysis and statistical power for a range of true effect sizes, The default "medium" range is from 0.1 to 1, in increments of 0.1. However, a "small" and "large" range is also available (see the "size" argument below for details).

Value

This function returns the following:

dat

A dataset with the median results from power analyses for a range of effect sizes, including the specified true effect size, in a column labelled "power_true". The additional added columns include results for power analysis assuming a range of true effect sizes, with the default beginning at 0.1 ("power_es01"), then 0.2 ("power_es02"), then continuing in increments of 0.1 up to 1 ("power_es1"). A "small" and "large" effect size range is also possible (see the 'size' argument for details)

fp_plot

A firepower plot

Examples

### Calcuate median power for 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)

### Extract data from datasets in list
power_dat <- fp$dat
power_dat

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


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