dgm: DGM Method

View source: R/dgm.R

dgmR Documentation

DGM Method

Description

S3 Method for defining data-generating mechanisms. See simulate_dgm() for usage and further details.

Usage

dgm(dgm_name, settings)

Arguments

dgm_name

Character string specifying the DGM type

settings

List containing the required parameters for the DGM or numeric condition_id

Value

A data frame with simulated data following the structure described in the Output Structure section. This is an S3 generic method that dispatches to specific DGM implementations based on dgm_name.

Output 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.

See Also

simulate_dgm()

Examples


simulate_dgm("Carter2019", 1)

PublicationBiasBenchmark documentation built on March 16, 2026, 5:07 p.m.