Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

OHPL.sim

Generate Simulation Data for Benchmarking Sparse Regressions (Gaussian Response)


Description

Generate simulation data (Gaussian case) following the settings in Xiao and Xu (2015).

Usage

OHPL.sim(n = 100, p = 100, rho = 0.8, coef = rep(1, 10), snr = 3,
  p.train = 0.5, 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>

References

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.

Examples

dat <- OHPL.sim(
  n = 100, p = 100, rho = 0.8,
  coef = rep(1, 10), snr = 3, p.train = 0.5,
  seed = 1010
)

dim(dat$x.tr)
dim(dat$x.te)

OHPL

Ordered Homogeneity Pursuit Lasso for Group Variable Selection

v1.4
GPL-3 | file LICENSE
Authors
You-Wu Lin [aut], Nan Xiao [cre] (<https://orcid.org/0000-0002-0250-5673>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.