meta_mean {esci}R Documentation

Estimate a meta-analytic mean across multiple single-group studies.

Description

meta_mean is suitable for synthesizing across multiple single-group studies with a continuous outcome variable when all studies are measured on the same scale.

Usage

meta_mean(
  data,
  means,
  sds,
  ns,
  labels = NULL,
  moderator = NULL,
  contrast = NULL,
  effect_label = "My effect",
  reference_mean = 0,
  reported_effect_size = c("mean_difference", "smd_unbiased", "smd"),
  random_effects = TRUE,
  conf_level = 0.95
)

Arguments

data

A dataframe or tibble

means

A collection of study means, 1 per study

sds

A collection of study standard deviations, 1 per study, all >0

ns

A collection of sample sizes, 1 per study, all integers > 2

labels

An optional collection of study labels

moderator

An optional factor to analyze as a categorical moderator, must have k > 2 per groups

contrast

An optional contrast to estimate between moderator levels; express as a vector of contrast weights with 1 weight per moderator level.

effect_label

Optional character giving a human-friendly name of the effect being synthesized

reference_mean

Optional reference mean, defaults to 0

reported_effect_size

Character specifying effect size to return; Must be one of 'mean_difference', 'smd_unbiased' (to return an unbiased Cohen's d1) or 'smd' (to return Cohen's d1 without correction for bias)

random_effects

TRUE for random effect model; FALSE for fixed effects

conf_level

The confidence level for the confidence interval. Given in decimal form. Defaults to 0.95.

Details

The meta-analytic effect size, confidence interval and heterogeneity estimates all come from metafor::rma().

The diamond ratio and its confidence interval come from CI_diamond_ratio().

If reported_effect_size is smd_unbiased or smd the conversion to d1 is handled by CI_smd_one().

Value

An esci-estimate object; a list of data frames and properties. Returned tables include:

Examples

# Data set -- see Introduction to the New Statistics, 2nd edition
data("data_mccabemichael_brain")

# Fixed effect, 95% CI
estimate <- esci::meta_mean(
  data = esci::data_mccabemichael_brain,
  means = "M Brain",
  sds = "s Brain",
  ns = "n Brain",
  labels = "Study name",
  random_effects = FALSE
)

myplot_forest <- esci::plot_meta(estimate)


# Add a moderator, report cohen's d1
estimate_moderator_d <- esci::meta_mean(
  data = esci::data_mccabemichael_brain,
  means = "M Brain",
  sds = "s Brain",
  ns = "n Brain",
  labels = "Study name",
  moderator = "Research group",
  reported_effect_size = "smd_unbiased",
  random_effects = FALSE
)

# Forest plot
myplot_forest_moderator_d <- esci::plot_meta(estimate_moderator_d)



[Package esci version 1.0.3 Index]