Other packages > Find by keyword >

glmnet  

Lasso and Elastic-Net Regularized Generalized Linear Models
View on CRAN: Click here


Download and install glmnet package within the R console
Install from CRAN:
install.packages("glmnet")

Install from Github:
library("remotes")
install_github("cran/glmnet")

Install by package version:
library("remotes")
install_version("glmnet", "5.1")



Attach the package and use:
library("glmnet")
Maintained by
Trevor Hastie
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2008-06-02
Latest Update: 2025-07-17
Description:
Extremely efficient procedures for fitting the entire lasso or elastic-net regularization path for linear regression, logistic and multinomial regression models, Poisson regression, Cox model, multiple-response Gaussian, and the grouped multinomial regression; see and . There are two new and important additions. The family argument can be a GLM family object, which opens the door to any programmed family (). This comes with a modest computational cost, so when the built-in families suffice, they should be used instead. The other novelty is the relax option, which refits each of the active sets in the path unpenalized. The algorithm uses cyclical coordinate descent in a path-wise fashion, as described in the papers cited.
How to cite:
Trevor Hastie (2008). glmnet: Lasso and Elastic-Net Regularized Generalized Linear Models. R package version 5.1, https://cran.r-project.org/web/packages/glmnet. Accessed 26 Oct. 2026.
Previous versions and publish date:
(2026-09-24 10:40), 1.1-1 (2008-06-27 08:35), 1.1-2 (2008-12-23 09:02), 1.1-3 (2009-01-24 11:12), 1.1-4 (2009-12-18 17:36), 1.1-5 (2010-01-31 11:11), 1.1 (2008-06-02 09:00), 1.2 (2010-04-04 17:43), 1.3 (2010-04-25 09:26), 1.4 (2010-06-16 17:35), 1.5.1 (2010-11-19 08:33), 1.5.2 (2011-02-07 10:50), 1.5.3 (2011-03-01 01:04), 1.5 (2010-11-04 21:16), 1.6 (2011-04-24 08:08), 1.7.1 (2011-09-23 13:45), 1.7.3 (2012-02-19 10:12), 1.7.4 (2012-04-27 08:02), 1.7 (2011-06-15 20:50), 1.8-2 (2012-10-02 08:20), 1.8-4 (2012-12-27 23:11), 1.8-5 (2013-01-04 09:21), 1.8 (2012-07-03 19:50), 1.9-1 (2013-02-10 20:17), 1.9-3 (2013-03-02 08:14), 1.9-5 (2013-08-04 02:09), 1.9-8 (2014-05-24 22:49), 2.0-1 (2015-04-08 11:12), 2.0-2 (2015-04-12 00:56), 2.0-3 (2016-02-23 07:18), 2.0-4 (2016-03-13 11:29), 2.0-5 (2016-03-17 14:00), 2.0-8 (2017-04-30 09:02), 2.0-9 (2017-05-02 22:39), 2.0-10 (2017-05-06 08:23), 2.0-12 (2017-09-13 19:35), 2.0-13 (2017-09-22 07:43), 2.0-16 (2018-04-02 14:06), 2.0-18 (2019-05-20 07:10), 3.0-1 (2019-11-15 07:50), 3.0-2 (2019-12-11 18:00), 3.0 (2019-11-09 11:20), 4.0-2 (2020-06-16 02:00), 4.0 (2020-05-14 19:30), 4.1-1 (2021-02-21 18:40), 4.1-2 (2021-06-24 08:30), 4.1-3 (2021-11-02 19:50), 4.1-4 (2022-04-15 11:22), 4.1-6 (2022-11-27 23:10), 4.1-7 (2023-03-23 02:40), 4.1-8 (2023-08-22 05:10), 4.1-9 (2025-06-02 12:30), 4.1-10 (2025-07-17 06:50), 4.1 (2021-01-11 09:00), 5.0 (2026-05-04 07:40)
Other packages that cited glmnet R package
View glmnet citation profile
Other R packages that glmnet depends, imports, suggests or enhances
Complete documentation for glmnet
Functions, R codes and Examples using the glmnet R package
Some associated functions: BinomialExample . Cindex . CoxExample . MultiGaussianExample . MultinomialExample . PoissonExample . QuickStartExample . SparseExample . assess.glmnet . beta_CVX . bigGlm . cox.fit . cox.path . cox_obj_function . coxgrad . coxnet.deviance . cv.glmnet . dev_function . deviance.glmnet . elnet.fit . fid . get_cox_lambda_max . get_eta . get_start . glmnet-internal . glmnet-package . glmnet.control . glmnet.fit . glmnet.measures . glmnet . glmnet.path . makeX . mycoxph . mycoxpred . na.replace . obj_function . pen_function . plot.cv.glmnet . plot.glmnet . predict.cv.glmnet . predict.glmnet . predict.glmnetfit . print.cv.glmnet . print.glmnet . response.coxnet . rmult . stratifySurv . survfit.coxnet . survfit.cv.glmnet . use.cox.path . weighted_mean_sd . 
Some associated R codes: Cindex.R . RcppExports.R . assess.coxnet.R . assess.glmnet.R . auc.R . auc.mat.R . bigGlm.R . blend.relaxed.R . buildPredmat.array.R . buildPredmat.coxnetlist.R . buildPredmat.default.R . check.dots.R . check.exclude.R . coef.cv.glmnet.R . coef.cv.relaxed.R . coef.glmnet.R . coef.relaxed.R . coefnorm.R . confusion.glmnet.R . coxgrad.R . coxnet.R . coxnet.deviance.R . coxpath.R . cv.coxnet.R . cv.elnet.R . cv.fishnet.R . cv.glmnet.R . cv.glmnet.raw.R . cv.glmnetfit.R . cv.lognet.R . cv.mrelnet.R . cv.multnet.R . cv.relaxed.raw.R . cvcompute.R . cvstats.R . cvtype.R . data.R . deviance.glmnet.R . elnet.R . error.bars.R . family.glmnet.R . fishnet.R . fix.lam.R . getOptcv.glmnet.R . getOptcv.relaxed.R . getcoef.R . getcoef.multinomial.R . glmnet-package.R . glmnet.R . glmnet.control.R . glmnet.measures.R . glmnetFlex.R . glmnet_softmax.R . jerr.R . jerr.coxnet.R . jerr.elnet.R . jerr.fishnet.R . jerr.lognet.R . jerr.mrelnet.R . lambda.interp.R . lognet.R . makeX.R . mrelnet.R . na.mean.R . nonzeroCoef.R . onAttach.R . pb.R . plot.cv.glmnet.R . plot.cv.relaxed.R . plot.glmnet.R . plot.mrelnet.R . plot.multnet.R . plot.relaxed.R . plotCoef.R . predict.coxnet.R . predict.cv.glmnet.R . predict.cv.relaxed.R . predict.elnet.R . predict.fishnet.R . predict.glmnet.R . predict.lognet.R . predict.mrelnet.R . predict.multnet.R . predict.relaxed.R . print.bigGlm.R . print.confusion.table.R . print.cv.glmnet.R . print.cv.relaxed.R . print.glmnet.R . relax.glmnet.R . response.coxnet.R . rmult.R . roc.glmnet.R . stratifySurv.R . survfit.coxnet.R . survfit.cv.glmnet.R . zeromat.R .  Full glmnet package functions and examples
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

nextGenShinyApps  
Craft Exceptional 'R Shiny' Applications and Dashboards with Novel Responsive Tools
Nove responsive tools for designing and developing 'Shiny' dashboards and applications. The scripts ...
Download / Learn more Package Citations See dependency  
SADEG  
Stability Analysis in Differentially Expressed Genes
We analyzed the nucleotide composition of genes with a special emphasis on stability of DNA sequence ...
Download / Learn more Package Citations See dependency  
rts2  
Log-Gaussian Cox Process Models with Approximations
Supports modelling real-time case data to facilitate the real-time surveillance of infectious disea ...
Download / Learn more Package Citations See dependency  
LSDsensitivity  
Sensitivity Analysis Tools for 'LSD' Simulations
Tools for sensitivity analysis of LSD simulation models. Reads object-oriented data produced by LSD ...
Download / Learn more Package Citations See dependency  
MARSS  
Multivariate Autoregressive State-Space Modeling
The MARSS package provides maximum-likelihood parameter estimation for constrained and unconstraine ...
Download / Learn more Package Citations See dependency  

29,218

R Packages

247,686

Dependencies

77,281

Author Associations

29,219

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA