generate_syn_data: Generate Synthetic Data for CausalGPS Package

Description Usage Arguments Value Examples

View source: R/generate_synthetic_data.R

Description

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

Usage

1
2
3
4
5
6
generate_syn_data(
  sample_size = 1000,
  outcome_sd = 10,
  gps_spec = 1,
  cova_spec = 1
)

Arguments

sample_size

Number of data samples.

outcome_sd

Standard deviation used to generate the outcome in the synthetic data set.

gps_spec

A numerical value (1-7) that indicates the GPS model used to generate synthetic data. See the code for more details.

cova_spec

A numerical value (1-2) to modify the covariates. See the code for more details.

Value

synthetic_data: The function returns a data.frame saved the constructed synthetic data.

Examples

1
2
3
4
set.seed(298)
s_data <- generate_syn_data(sample_size=100,
                                  outcome_sd = 10, gps_spec = 1,
                                  cova_spec = 1)

CausalGPS documentation built on Feb. 7, 2022, 5:12 p.m.