Skip to contents

Generates synthetic data set based on different GPS models and covariates.

Usage

generate_synthetic_data(
  sample_size = 1000,
  outcome_sd = 10,
  gps_spec = 1,
  cova_spec = 1
)

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)