generate_syn_data {CausalGPS} | R Documentation |
Generate synthetic data for the CausalGPS package
Description
Generates synthetic data set based on different GPS models and covariates.
Usage
generate_syn_data(
sample_size = 1000,
outcome_sd = 10,
gps_spec = 1,
cova_spec = 1,
vectorized_y = FALSE
)
Arguments
sample_size |
A positive integer number that represents a number of data samples. |
outcome_sd |
A positive double number that represents standard deviation used to generate the outcome in the synthetic data set. |
gps_spec |
A numerical integer values ranging from 1 to 7. The
complexity and form of the relationship between covariates and treatment
variables are determined by the
|
cova_spec |
A numerical value (1 or 2) to modify the covariates. It
determines how the covariates in the synthetic data set are transformed.
If |
vectorized_y |
A Boolean value indicates how Y internally is generated.
(Default = |
Value
synthetic_data
: The function returns a data.frame saved the
constructed synthetic data.
Examples
set.seed(298)
s_data <- generate_syn_data(sample_size = 100,
outcome_sd = 10,
gps_spec = 1,
cova_spec = 1)