meta_d2 {esci}R Documentation

Estimate meta-analytic standardized mean difference across multiple two group studies (all paired, all independent, or a mix).

Description

meta_d2 is suitable for synthesizing across multiple two-group studies (paired or independent) with a continuous outcome measure but where not all studies are measured on the same scale, and instead the magnitude of difference for each study is expressed as d_s or d_avg.

Usage

meta_d2(
  data,
  ds,
  comparison_ns,
  reference_ns,
  r = NULL,
  labels = NULL,
  moderator = NULL,
  contrast = NULL,
  effect_label = "My effect",
  assume_equal_variance = FALSE,
  random_effects = TRUE,
  conf_level = 0.95
)

Arguments

data

A data frame or tibble

ds

Set of bias-adjusted cohen's d_s or d_avg values, 1 for each study

comparison_ns

Set of comparison_group sample sizes, positive integers, 1 for each study

reference_ns

Set of reference_groups sample sizes, positive integers, 1 for each study

r

optional correlation between measures for w-s studies, NA otherwise

labels

Optional set of labels, 1 for each study

moderator

Optional factor as a categorical moderator; should have k > 2 per group

contrast

Optional vector specifying a contrast between moderator levels

effect_label

Optional character providing a human-friendly label for the effect

assume_equal_variance

Defaults to FALSE

random_effects

Boolean; TRUE for a random effects model; otherwise fixed effects

conf_level

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

Details

Once you generate an estimate with this function, you can visualize it with plot_meta().

Each study's effect size should be expressed as: Cohen's d_s: (comparison_mean - reference_mean) / sd_pooled or Cohen_'s d_avg: (comparison_mean - reference_mean) / sd_avg

To enter d_s, set assume_equal_variance to TRUE To enter d_avg, set assume_equal_variance to FALSE

And the d values should all be corrected for bias. The function CI_smd_ind_contrast() can assist with converting raw data from each study to d_s or d_avg with bias correction. It also has more details on calculation of these forms of d and their CIs.

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().

Value

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

Examples

# Data set -- see Introduction to the New Statistics, 1st edition
data("data_damischrcj")

# Meta-analysis, random effects, assuming equal variance, no moderator
estimate <- esci::meta_d2(
  data = esci::data_damischrcj,
  ds = "Cohen's d unbiased",
  comparison_ns = "n Control",
  reference_ns = "n Lucky",
  labels = Study,
  assume_equal_variance = TRUE,
  random_effects = TRUE
)

# Forest plot
myplot_forest <- esci::plot_meta(estimate)


# Add a categorical moderator
estimate_moderator <- esci::meta_d2(
  data = esci::data_damischrcj,
  ds = "Cohen's d unbiased",
  comparison_ns = "n Control",
  reference_ns = "n Lucky",
  labels = "Study",
  moderator = "Research Group",
  assume_equal_variance = TRUE,
  random_effects = TRUE
)

# Forest plot
myplot_forest_moderator <- esci::plot_meta(estimate_moderator)


[Package esci version 1.0.2 Index]