| simulate_dgm | R Documentation |
This function provides a unified interface to various data-generating
mechanisms for simulation studies. The specific DGM is determined by
the first argument. See
vignette("Adding_New_DGMs", package = "PublicationBiasBenchmark")
for details of extending the package with new DGMs.
simulate_dgm(dgm_name, settings)
dgm_name |
Character string specifying the DGM type |
settings |
List containing the required parameters for the DGM or numeric condition_id |
A data frame containing the generated data with standardized structure
The returned data frame follows a standardized schema that downstream functions rely on. Across the currently implemented DGMs, the following columns are used:
yi (numeric): The effect size estimate.
sei (numeric): Standard error of yi.
ni (integer): Total sample size for the estimate
(e.g., sum over groups where applicable).
es_type (character): Effect size type, used to disambiguate
the scale of yi. Currently used values are
"SMD" (standardized mean difference / Cohen's d),
"logOR" (log odds ratio), and "none"
(unspecified generic continuous coefficient).
study_id (integer/character, optional): Identifier of the
primary study/cluster when a DGM yields multiple estimates per study
(e.g., Alinaghi2018, PRE). If absent, each row is treated as an
independent study.
validate_dgm_setting(),
dgm.Stanley2017(),
dgm.Alinaghi2018(),
dgm.Bom2019(),
dgm.Carter2019()
simulate_dgm("Carter2019", 1)
simulate_dgm("Carter2019", list(mean_effect = 0, effect_heterogeneity = 0,
bias = "high", QRP = "high", n_studies = 10))
simulate_dgm("Stanley2017", list(environment = "SMD", mean_effect = 0,
effect_heterogeneity = 0, bias = 0, n_studies = 5,
sample_sizes = c(32,64,125,250,500)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.