R/simulate_data.R
sim_semicontinuous_data.RdGenerates semicontinuous data with heterogeneity of treatment effect
sim_semicontinuous_data(n.obs = 1000, n.vars = 25)
| n.obs | number of observations |
|---|---|
| n.vars | number of variables. Must be at least 10 |
returns list with values y for outcome, x for design matrix, trt for
treatment assignments, betanonzero for true coefficients for treatment-covariate interactions for model for
whether or not a response is nonzero, betapos for true coefficients for treatment-covariate interactions
for positive model, treatment_risk_ratio for the true covariate-conditional treatment effect risk ratio for
each observation, pi.x for the true underlying propensity score