synthetic_data {bartcs} | R Documentation |
Synthetic dataset for simulation
Description
Create synthetic dataset for simulation.
Usage
synthetic_data(N = 300, P = 100, seed = 42, binary_trt = TRUE)
Arguments
N |
Number of observations for dataset. The default value is set to 300. |
P |
Number of potential confounders for dataset. Need to set X > 7 for data generation. The default value is set to 100. |
seed |
Seed value for simulation. The default value is set to 42. |
binary_trt |
Whether the treatment is binary. The default value is set to TRUE. |
Details
synthetic_data()
generates synthetic dataset for Scenario 1 from
Kim et al. (2023). Among possible confounders, X1 - X5 are true confounders.
Value
Provide list with the following components
Y |
A vector of outcome values. |
Trt |
A vector of binary treatment values. |
X |
A matrix of potential confounders. |
References
Kim, C., Tec, M., & Zigler, C. M. (2023). Bayesian Nonparametric Adjustment of Confounding, Biometrics doi:10.1111/biom.13833
Examples
synthetic_data()