Wrapper function to simulate data, fit tree, and evaluate outcomes

run_simu(
  gps_spec = 1,
  num_exposure_cats,
  sample_size = 20000,
  em_spec = 1,
  heterogenous_intercept = FALSE,
  beta = NULL,
  outcome_sd = 1,
  correct_splits = NULL,
  true_trt_effect_func = NULL,
  noise.var,
  n_trials,
  lambdas,
  stopping.rule,
  exploration.sample_covs = NULL,
  inference.sample_covs = NULL,
  val.sample_covs = NULL,
  matched.exploration.sample = NULL,
  matched.validation.sample = NULL,
  matched.inference.sample = NULL,
  true_modifiers = c(),
  regenerate_covs = 0
)

Arguments

gps_spec

gps matching setting

num_exposure_cats

the number of categories to bin the exposure level into for stratification

sample_size

sample size for data generation

em_spec

effect modifier generation setting

heterogenous_intercept

adding heterogenous intercepts for particular settings

beta

various levels of beta to test

outcome_sd

specify outcome generation

correct_splits

correct splits of particular setting

true_trt_effect_func

function passed in to get true effect

noise.var

noise variables

n_trials

number of trials for simulation

lambdas

various levels of lambda to test

stopping.rule

stopping rule

exploration.sample_covs

description

inference.sample_covs

description

val.sample_covs

description

matched.exploration.sample

description

matched.validation.sample

description

matched.inference.sample

description

true_modifiers

the true modifiers for particular setting

regenerate_covs

whether to regenerate covariates each time we generate (UNUSED)

Value

dataframe with one row for each tree in sequence and lambda value, representing the ability of the tree to explain the effect heterogeneity