generate_data: Generate data for

Description Usage Arguments Value Examples

View source: R/dgp_fns.R

Description

Generate data for

Usage

1
generate_data(n, dgp, correct_outcome = TRUE, correct_ps = TRUE)

Arguments

n

desired sample size.

dgp

character string indicating desired data-generating process. Currently the following DGPs are implemented, each based on a different publication: ks, Kang and Shafer; ld, Lunceford and Davidian; fi Fan and Imai; ls, Leacy and Stuart; ik Iacus and King; iw Waernbaum; pa Austin.

correct_outcome

logical indicating whether the outcome model should eb correctly specified.

correct_ps

logical indicating whether the propensity score model should be correctly specified.

Value

a list of objects including

Examples

1
2
3
4
gen_mod <- generate_data(n = 100, 
                         dgp = 'ks', 
                         correct_outcome = FALSE,
                         correct_ps = TRUE)

denisagniel/synthate documentation built on April 16, 2020, 12:45 a.m.