generate_data: Generate predictor and outcome data

Description Usage Arguments Value

View source: R/generate_data.R

Description

Generate predictor and outcome data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
generate_data(
  sample_size = 10000,
  n_covariates = 10,
  n_normal = n_covariates,
  pair_cor,
  alpha,
  beta = NULL,
  outcome_type = NULL,
  n_iter = 1000,
  prop_treated = NULL,
  risk_diff = 0,
  margin_prev
)

Arguments

sample_size

integer specifying the sample size

n_covariates

integer specifying the number of covariates

n_normal

integer specifying the number of normal covariates (must be <= n_convariates)

pair_cor

pairwise correlation

alpha

covariate vector of length n_covariate

beta

coefficient for treatment-dummy

outcome_type

character value "continuous" or "binary"

n_iter

integer indicating number of iterations

prop_treated

numerical value of intended proportion of treated individuals

risk_diff

numerical value of intended risk difference

margin_prev

numerical value of intenden marginal prevalence

Value

a list with the following content

alpha_0_treat numerical value indicating intercept of treatment model \item alpha_0_outcome numerical value indicating intercept of outcome model \item beta numerical value indicating regression coefficient of treatment dummy


annloh/austin2011 documentation built on Aug. 22, 2020, 12:13 a.m.