powered by
Create synthetic dataset for simulation.
synthetic_data(N = 300, P = 100, seed = 42, binary_trt = TRUE)
Provide list with the following components
A vector of outcome values.
A vector of binary treatment values.
A matrix of potential confounders.
Number of observations for dataset. The default value is set to 300.
Number of potential confounders for dataset. Need to set X > 7 for data generation. The default value is set to 100.
Seed value for simulation. The default value is set to 42.
Whether the treatment is binary. The default value is set to TRUE.
synthetic_data() generates synthetic dataset for Scenario 1 from Kim et al. (2023). Among possible confounders, X1 - X5 are true confounders.
synthetic_data()
Kim, C., Tec, M., & Zigler, C. M. (2023). Bayesian Nonparametric Adjustment of Confounding, Biometrics tools:::Rd_expr_doi("10.1111/biom.13833")
Run the code above in your browser using DataLab