Simulates univariate regression environments to estimate the effect of X1 on Y (parameter alpha1). Effect heterogeneity is introduced via an omitted variable (X2) correlated with X1, whose coefficient (alpha2) is randomly distributed with mean zero and variance sigma2_h.
The description and code is based on hong2021using;textualPublicationBiasBenchmark. The data-generating mechanism was introduced in bom2019kinked;textualPublicationBiasBenchmark.
# S3 method for Bom2019
dgm(dgm_name, settings)Data frame with
effect size
standard error
sample size
effect size type
DGM name (automatically passed)
List containing
Mean effect
Mean effect heterogeneity
Proportion of studies affected by publication bias
Number of effect size estimates
Sample sizes of the effect size estimates. A vector of sample sizes needs to be supplied. The sample sizes in the vector are sequentially reused until all effect size estimates are generated.
This function simulates univariate regression environments, focusing on estimating the effect of a variable X1 on a dependent variable Y, represented by the parameter alpha1. The simulation introduces variation in the standard errors of estimated effects by allowing sample sizes to differ across primary studies. Effect heterogeneity is modeled through an omitted variable (X2) that is correlated with X1, where the coefficient on the omitted variable, alpha2, is randomly distributed across studies with mean zero and variance sigma2_h.
Publication selection is modeled in two regimes: (1) no selection, and (2) 50% selection. Under 50% selection, each estimate has a 50% chance of being evaluated for inclusion. If selected, only positive and statistically significant estimates are published; otherwise, new estimates are generated until this criterion is met. This process continues until the meta-analyst’s sample reaches its predetermined size.
dgm(), validate_dgm_setting()