Generate synthetic data for the GPCERF package
Source:R/generate_synthetic_data.R
generate_synthetic_data.Rd
Generates synthetic data set based on different GPS models and covariates.
Arguments
- sample_size
A number of data samples.
- outcome_sd
Standard deviation used to generate the outcome in the synthetic data set.
- gps_spec
A numeric value (1-6) that indicates the GPS model used to generate the continuous exposure.
- cova_spec
A numeric value (1-2) to modify the covariates.
Value
A data frame of the synthetic data. Outcome is labeled as Y, exposure as w, and covariates cf1-6.
Examples
set.seed(351)
data <- generate_synthetic_data(sample_size = 200)