meta_proportion {esci}R Documentation

Estimate a meta-analytic proportion of outcomes over multiple studies with a categorical outcome variable.

Description

meta_proportion is suitable for synthesizing across multiple studies with a categorical outcome variable. It takes as input the number of cases/events and the number of samples in each study.

Usage

meta_proportion(
  data,
  cases,
  ns,
  labels = NULL,
  moderator = NULL,
  contrast = NULL,
  effect_label = "My effect",
  random_effects = TRUE,
  conf_level = 0.95
)

Arguments

data

A dataframe or tibble

cases

A collection of cases/event counts, 1 per study, all integers, 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

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

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

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

Value

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

Examples

# Data set: Replications of power on egocentric behavior
esci_meta_pdiff_two <- data.frame(
  studies = c(
    "Online",
    "Original",
    "Online Pilot",
    "Exact replication"
  ),
  control_egocentric = c(
    33,
    4,
    4,
    7
  ),
  control_sample_size = c(
   101,
    33,
    10,
    53
  ),
  power_egocentric = c(
    48,
    8,
    4,
    11
  ),
  power_sample_size = c(
    105,
    24,
    12,
    56
  ),
  setting = as.factor(
    c(
      "Online",
     "In-Person",
      "Online",
      "In-Person"
    )
  )
)

# Meta-analysis, risk difference as effect size
estimate <- esci::meta_proportion(
  esci_meta_pdiff_two,
  power_egocentric,
  power_sample_size,
  studies
)

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


# Meta-analysis, risk difference as effect size, moderator (setting)
estimate_moderator <- esci::meta_proportion(
  esci_meta_pdiff_two,
  power_egocentric,
  power_sample_size,
  studies,
  moderator = setting
)

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



[Package esci version 1.0.2 Index]