knitr::knit_hooks$set(pngquant = knitr::hook_pngquant) knitr::opts_chunk$set( echo = FALSE, message = FALSE, warning = FALSE, collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", dev = "ragg_png", dpi = 150, fig.retina = 2, fig.width = 10, fig.height = 5, out.width = "100%", pngquant = "--speed=1 --quality=80" )
msaenet implements the multi-step adaptive elastic-net (MSAENet) algorithm for feature selection in high-dimensional regressions proposed in Xiao and Xu (2015) [PDF].
Nonconvex multi-step adaptive estimations based on MCP-net or SCAD-net are also supported.
Check vignette("msaenet")
to get started.
You can install msaenet from CRAN:
install.packages("msaenet")
Or try the development version on GitHub:
remotes::install_github("nanxstats/msaenet")
To cite the msaenet package in publications, please use
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.
A BibTeX entry for LaTeX users is
@article{xiao2015multi, title = {Multi-step adaptive elastic-net: reducing false positives in high-dimensional variable selection}, author = {Nan Xiao and Qing-Song Xu}, journal = {Journal of Statistical Computation and Simulation}, volume = {85}, number = {18}, pages = {3755--3765}, year = {2015}, doi = {10.1080/00949655.2015.1016944} }
library("msaenet") dat <- msaenet.sim.gaussian( n = 500, p = 500, rho = 0.8, coef = c(rep(-1, 2), rep(1, 3)), snr = 1.5, p.train = 0.5, seed = 1001 )
#| msaenet aenet.fit <- aenet( dat$x.tr, dat$y.tr, alphas = seq(0.1, 0.9, 0.1), seed = 1003 ) msaenet.fit <- msaenet( dat$x.tr, dat$y.tr, alphas = seq(0.1, 0.9, 0.1), nsteps = 5L, tune.nsteps = "ebic", seed = 1003 ) par(mfrow = c(1, 2)) plot(aenet.fit) plot(msaenet.fit)
#| msamnet amnet.fit <- amnet( dat$x.tr, dat$y.tr, alphas = seq(0.1, 0.9, 0.1), seed = 1003 ) msamnet.fit <- msamnet( dat$x.tr, dat$y.tr, gammas = 3, alphas = seq(0.1, 0.9, 0.1), nsteps = 4L, tune.nsteps = "ebic", seed = 1003 ) par(mfrow = c(1, 2)) plot(amnet.fit) plot(msamnet.fit)
#| msasnet asnet.fit <- asnet( dat$x.tr, dat$y.tr, alphas = seq(0.1, 0.9, 0.1), seed = 1003 ) msasnet.fit <- msasnet( dat$x.tr, dat$y.tr, gammas = 3.7, alphas = seq(0.1, 0.9, 0.1), nsteps = 4L, tune.nsteps = "ebic", seed = 1003 ) par(mfrow = c(1, 2)) plot(asnet.fit) plot(msasnet.fit)
To contribute to this project, please take a look at the Contributing Guidelines first. Please note that the msaenet project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
msaenet is free and open source software, licensed under GPL-3.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.