data_gen_p2: Data generation function for scenario 2
This function generates data to test different causal inference methods for scenario 2. Please use our main function data_gen.R
Description
Data generation function for scenario 2
This function generates data to test different causal inference methods for scenario 2. Please use our main function data_gen.R
levels of covariate overlap: Please select: weak, strong, moderate
all_confounder
TRUE or FALSE. overlap is lacking for a variable that is not predictive of the outcome (all_confounder equals to TRUE) or situations when it is lacking for a true confounder (all_confounder equals to FALSE)
Value
list with the 5 elements. Nested within each list, it contains
n:
Number of units for simulation
trt_ind:
A data frame with number of rows equals to n and 11 columns