View source: R/generate_synthetic_data.R
generate_syn_data | R Documentation |
Generates synthetic data set based on different GPS models and covariates.
generate_syn_data(
sample_size = 1000,
outcome_sd = 10,
gps_spec = 1,
cova_spec = 1,
vectorized_y = FALSE
)
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 = |
synthetic_data
: The function returns a data.frame saved the
constructed synthetic data.
set.seed(298)
s_data <- generate_syn_data(sample_size = 100,
outcome_sd = 10,
gps_spec = 1,
cova_spec = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.