Description Usage Arguments Value Author(s) References Examples
Generate simulation data (Gaussian case) following the settings in Xiao and Xu (2015).
1 2 | msaenet.sim.gaussian(n = 300, p = 500, rho = 0.5, coef = rep(0.2,
50), snr = 1, p.train = 0.7, seed = 1001)
|
n |
Number of observations. |
p |
Number of variables. |
rho |
Correlation base for generating correlated variables. |
coef |
Vector of non-zero coefficients. |
snr |
Signal-to-noise ratio (SNR). SNR is defined as \frac{Var(E(y | X))}{Var(Y - E(y | X))} = \frac{Var(f(X))}{Var(\varepsilon)} = \frac{Var(X^T β)}{Var(\varepsilon)} = \frac{Var(β^T Σ β)}{σ^2}. |
p.train |
Percentage of training set. |
seed |
Random seed for reproducibility. |
List of x.tr
, x.te
, y.tr
, and y.te
.
Nan Xiao <https://nanx.me>
Nan Xiao and Qing-Song Xu. (2015). Multi-step adaptive elastic-net: reducing false positives in high-dimensional variable selection. Journal of Statistical Computation and Simulation 85(18), 3755–3765.
1 2 3 4 5 6 7 8 | dat <- msaenet.sim.gaussian(
n = 300, p = 500, rho = 0.6,
coef = rep(1, 10), snr = 3, p.train = 0.7,
seed = 1001
)
dim(dat$x.tr)
dim(dat$x.te)
|
[1] 210 500
[1] 90 500
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.