Description Usage Arguments Value
View source: R/generate_data.R
Generate predictor and outcome data
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
)
|
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 |
beta |
coefficient for treatment-dummy |
outcome_type |
character value |
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 |
a list with the following content
sim_data
dataframe with simulated data
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.