Simulate a meta-analysis dataset

sim_stats(
  measure = "mean",
  measure_spread = "sd",
  n_df = sim_n(),
  wide = TRUE,
  rdist = "norm",
  par = list(mean = 50, sd = 0.2),
  tau_sq = 0.4,
  effect_ratio = 1.2
)

Arguments

measure

Calculate sample median or mean. Defaults to mean.

measure_spread

Defaults to standard deviation, sd. Specify "iqr", "range", "sd", "var". Will have to check how many of these are done right now.

n_df

data.frame of sample sizes.

wide

Logical indicating if wide format, as is expected by metafor. Defaults to TRUE.

rdist

string indicating distribution, "norm", "lnorm", "exp", or "pareto"

par

list of parameter arguments

tau_sq

Variance \(\gamma_k \sim N(0, \tau^2)\) associated with the random effect

effect_ratio

ratio of population effects intervention / control