simulate_data {causens} | R Documentation |
Generate data with unmeasured confounder
Description
Generate data with unmeasured confounder
Usage
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
)
Arguments
ymodel |
A string indicating the functional form of the outcome model. |
N |
The number of observations to be generated. |
u_type |
A string indicating the type of the unmeasured confounder: "binary" or "continuous". |
y_type |
A string indicating the type of the outcome: "binary" or "continuous". |
seed |
The seed for the random number generator. |
alpha_uz |
Unmeasured confounder coefficient in the propensity score model. |
beta_uy |
Unmeasured confounder coefficient in the outcome model. |
treatment_effects |
The treatment effect. |
informative_u |
A boolean indicating whether the unmeasured confounder is driven by covariates. |
Value
A data frame with the simulated dataset.
[Package causens version 0.0.3 Index]