Generate data with unmeasured confounder
simulate_data(
ymodel = "linear",
N = 500,
u_type = "binary",
y_type = "continuous",
seed = 123,
alpha_uz = 0.2,
beta_uy = 0.5,
treatment_effects = 1,
informative_u = FALSE
)A data frame with the simulated dataset.
A string indicating the functional form of the outcome model.
The number of observations to be generated.
A string indicating the type of the unmeasured confounder: "binary" or "continuous".
A string indicating the type of the outcome: "binary" or "continuous".
The seed for the random number generator.
Unmeasured confounder coefficient in the propensity score model.
Unmeasured confounder coefficient in the outcome model.
The treatment effect.
A boolean indicating whether the unmeasured confounder is driven by covariates.