msaenet.sim.poisson {msaenet} | R Documentation |
Generate Simulation Data for Benchmarking Sparse Regressions (Poisson Response)
Description
Generate simulation data for benchmarking sparse Poisson regression models.
Usage
msaenet.sim.poisson(
n = 300,
p = 500,
rho = 0.5,
coef = rep(0.2, 50),
snr = 1,
p.train = 0.7,
seed = 1001
)
Arguments
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). |
p.train |
Percentage of training set. |
seed |
Random seed for reproducibility. |
Value
List of x.tr
, x.te
, y.tr
, and y.te
.
Author(s)
Nan Xiao <https://nanx.me>
Examples
dat <- msaenet.sim.poisson(
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)
[Package msaenet version 3.1.2 Index]