Description Usage Arguments Value
View source: R/simulate_functions.R
gen.sim.data
generates data from the following model
Y = X_0 Beta_0^T + X_1 Beta_1^T + Z Gamma^T + E Sigma^1/2,
Z|X_0, X_1 = X_0 Alpha_0^T + X_1 Alpha_1^T + D,
cov(X_0, X_1) ~ Sigma_X
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
n |
number of observations |
p |
number of observed variables |
r |
number of confounders |
d0 |
number of nuisance regression covariates |
d1 |
number of primary regression covariates |
X.dist |
the distribution of X, either "binary" or "normal" |
alpha |
association of X and Z, a r*d vector (d = d0 + d1) |
beta |
treatment effects, a p*d vector |
beta.strength |
strength of beta |
beta.nonzero.frac |
if beta is not specified, fraction of nonzeros in beta |
Gamma |
confounding effects, a p*r matrix |
Gamma.strength |
strength of Gamma, more precisely the mean of square entries of Gamma * alpha |
Gamma.beta.cor |
the "correlation" (proportion of variance explained) of beta and Gamma |
Sigma |
noise variance, a p*p matrix or p*1 vector or a single real number |
seed |
random seed |
a list of objects
matrix of nuisance covariates
matrix of primary covariates
matrix Y
matrix of confounders
regression coefficients between X and Z
regression coefficients between X and Y
coefficients between Z and Y
noise variance
the nonzero positions in beta
number of confounders
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.