Description Usage Arguments Value Author(s) References Examples
It returns simulated data. This is corresponding to high dimensional linear model simulation settings in the manuscript.
1 |
seed |
Random seed. |
n |
Number of subjects. |
p |
Number of variables. |
beta |
Coefficients. |
A list object containing the simulated data.
Chong Wu and Wei Pan
Wu, C., Xu, G., Shen, X., & Pan, W. (2018+). An adaptive test for high-dimensional generalized linear models with application to detect gene-environment interactions, Submitted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Generate the data (codes for the simulations in the manuscript)
n = 30
signal.r = 0
nInformative = 3
p = 40
seed = 1
s = 0.01
non.zero = floor((p/2) * s)
alpha = c(rep(0,p/2 - non.zero), runif(non.zero,-signal.r,signal.r))
beta = c(rep(2,nInformative), rep(0,(p/2- 3)), alpha)
dat = sim_data(seed, n = n, p = p, beta = beta)
X = dat$X
Y = dat$Y
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.