glmnet: Lasso and Elastic-Net Regularized Generalized Linear Models

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 <doi:10.18637/jss.v033.i01> and <doi:10.18637/jss.v039.i05>. There are two new and important additions. The family argument can be a GLM family object, which opens the door to any programmed family (<doi:10.18637/jss.v106.i01>). 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.

Version: 4.1-7
Depends: R (≥ 3.6.0), Matrix (≥ 1.0-6)
Imports: methods, utils, foreach, shape, survival, Rcpp
LinkingTo: RcppEigen, Rcpp
Suggests: knitr, lars, testthat, xfun, rmarkdown
Published: 2023-03-23
Author: Jerome Friedman [aut], Trevor Hastie [aut, cre], Rob Tibshirani [aut], Balasubramanian Narasimhan [aut], Kenneth Tay [aut], Noah Simon [aut], Junyang Qian [ctb], James Yang [aut]
Maintainer: Trevor Hastie <hastie at>
License: GPL-2
NeedsCompilation: yes
SystemRequirements: C++17
Citation: glmnet citation info
Materials: README NEWS
In views: MachineLearning, Survival
CRAN checks: glmnet results


Reference manual: glmnet.pdf
Vignettes: Regularized Cox Regression
An Introduction to glmnet
The family Argument for glmnet
The Relaxed Lasso


Package source: glmnet_4.1-7.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): glmnet_4.1-7.tgz, r-oldrel (arm64): glmnet_4.1-7.tgz, r-release (x86_64): glmnet_4.1-7.tgz, r-oldrel (x86_64): glmnet_4.1-7.tgz
Old sources: glmnet archive

Reverse dependencies:

Reverse depends: adapt4pv, AHM, bapred, BioMark, CBPS, cosso, cpfa, ctmle, DTRlearn2, elasso, ensr, EstHer, gamlss.lasso, GlarmaVarSel, glmnetcr, glmSparseNet, glmvsd, Grace, HIMA, HSDiC, InvariantCausalPrediction, ipflasso, islasso, KLexp, Lavash, mcen, metagenomeSeq, MetGen, mmabig, MNS, mpath, MRFcov, MTPS, MultiGlarmaVarSel, MultiVarSel, netcox, omada, PAS, personalized, ProSGPV, prototest, qut, RLassoCox, roccv, selectiveInference, sharpPen, SIMMS, sox, SPSP, tmle, trena, TSGSIS
Reverse imports: a4Base, a4Classif, a4Core, afthd, aglm, alookr, AMARETTO, amp, AnchorRegression, animalcules, ArCo, argo, armada, arulesCBA, ASICS, bastah, bbknnR, BBSSL, BeSS, bestglm, bgsmtr, BioMM, biospear, BloodCancerMultiOmics2017, BNrich, bolasso, BOSSreg, BrainCon, BSPBSS, BWGS, c060, categoryEncodings, causalweight, cbl, CenBAR, CERFIT, changepoints, cmenet, coca, coda4microbiome, ComICS, Compositional, CondCopulas, conformalInference.multi, ConformalSmallest, ConnectednessApproach, cornet, covdepGE, cpt, CRE, creditmodel, crossurr, CSCNet, customizedTraining, CytoDx, DDL, DEET, DepInfeR, DevTreatRules, dipw, distillML, dlbayes, DLL, dmlalg, DMRnet, DMTL, dnr, doc2concrete, DWLasso, ecpc, emBayes, enetLTS, EnMCB, ENMeval, EnsembleBase, EnsemblePenReg, ePCR, ER, eshrink, EventPointer, eventstream, expandFunctions, EZtune, FADA, fairml, FGLMtrunc, FindIt, FindIT2, finnts, FLAME, FLORAL, fmerPack, fssemR, FunctanSNP, fuser, gamlss.foreach, gamreg, gapclosing, GAprediction, GEInfo, gespeR, ggmix, glmnetSE, glmnetUtils, glmtrans, GMDH2, GMSimpute, gofar, goffda, graphicalExtremes, graphicalVAR, gren, GRSxE, GWLelast, hal9001, hbal, HCTR, HDCI, hdi, hdm, hdme, hdnom, hierGWAS, hierinf, HTLR, HTRX, ICBioMark, idopNetwork, IFAA, inet, inters, IRCcheck, IsingFit, joinet, knockoff, kosel, l1spectral, LassoSIR, latentgraph, LEGIT, lilikoi, lime, LinearDetect, LKT, localModel, logicDT, LPRelevance, LUCIDus, mase, MaximinInfer, maxnet, mcb, mcboost, mdpeer, MEAT, MendelianRandomization, MESS, MetabolicSurv, metafuse, mgm, mice, mikropml, milr, mimi, miRLAB, missoNet, modnets, mombf, monaLisa, mplot, MRFA, msaenet, MSclassifR, MTE, mudfold, multid, multiness, multivar, multiview, MWRidge, NADIA, naivereg, natural, nbfar, NCutYX, nestedcv, netDx, netgsa, nethet, nnfor, nnGarrote, nonet, NonProbEst, nproc, obliqueRSF, OHPL, omicwas, oncoPredict, OOS, palasso, PathoStat, pathwayTMB, pda, PDN, pencal, pengls, penppml, pgraph, phd, pheble, PheCAP, PheVis, PhylogeneticEM, Pi, plsmselect, PMAPscore, politeness, polywog, POMA, PPLasso, pre, precmed, predhy, predhy.GUI, predictoR, prioritylasso, PRISM.forecast, PRSPGx, QTL.gCIMapping, QTL.gCIMapping.GUI, quanteda.textmodels, ramwas, rare, RaSEn, rdomains, regnet, regressoR, regsplice, regtools, relgam, RESOLVE, rexposome, Rforestry, Ricrt, RISCA, RIVER, rminer, RNAseqNet, roben, RobMixReg, RobustIV, Robyn, ROCSI, RPtests, rqt, rrpack, RSDA, RTextTools, SAVER, SBICgraph, scAnnotate, SCFA, scGPS, sdafilter, SelectBoost, SEMgraph, SentimentAnalysis, sentometrics, sharp, SIAMCAT, Sieve, signeR, SIHR, SILM, simputation, sirus, SIS, SISIR, sivs, SLBDD, slimrec, SLOPE, SMLE, sMTL, smurf, SoftBart, SOIL, sparsenetgls, sparsereg, sparsevar, sparsevb, spinBayes, SplitKnockoff, splitSelect, spm2, SPONGE, SPOT, sprintr, SpTe2M, squant, squeezy, stabiliser, StabilizedRegression, stacks, starnet, statVisual, stepPenal, STGS, stm, STOPES, StratifiedMedicine, sureLDA, SuRF.vs, SurvHiDim, survival.svb, survivalSL, TANDEM, tehtuner, TextForecast, tools4uplift, TOP, TOSI, TraceAssist, traineR, TRexSelector, triplot, tsensembler, tsrobprep, TULIP, varEst, varycoef, VSOLassoBag, webSDM, wsprv, xcore, xLLiM, xrf, ZVCV
Reverse suggests: adaptMT, aorsf, autostats, BAGofT, bamlss, bbl, bcaboot, biglasso, bigstatsr, BiodiversityR, BOSO, broom, caretEnsemble, casebase, cases, catdata, censored, ClassifyR, CMA, coefplot, CompareCausalNetworks, condvis2, cpi,, cvwrapr, cydar, decoupleR, DoubleML, easyalluvial, EBglmnet, eclust, ecostats, EHR, familiar, fdm2id, FeatureHashing, flexmix, forecastML, FRESA.CAD, fscaret, gamlss.ggplots, GenericML, gesso, ggfortify, GWASinlps, heuristica, iml, imputeR, LDLcalc, live, LSAmitR, MachineShop, MatchIt, MetNet, MFSIS, microbiomeMarker, mlr, mlr3learners, mlr3pipelines, mlr3tuningspaces, mlr3viz, modelplotr, modeltime, modeltime.ensemble, modeltime.resample, nestedmodels, nlpred, nscancor, oosse, ordinalNet, origami, oscar, Patterns, philr, plotmo, pmml, polle, projpred, pulsar, purgeR, quadrupen, r2pmml, rcellminer, regsem, riskRegression, RnBeads, s2net, sAIC, sense, sgd, sgs, simulator, sparsegl, spatstat.model, SplitReg, sqlscore, stabs, STPGA, stratamatch, subsemble, SuperLearner, superMICE, superml, survex, swag, TAPseq, TBSignatureProfiler, TensorTest2D, text, text2vec, tidyfit, tornado, tramnet, treemisc, UBayFS, varbvs, vimp, vip, WeightedROC
Reverse enhances: prediction


Please use the canonical form to link to this page.