IDEAS home Printed from https://ideas.repec.org/c/boc/bocode/s458458.html
 

LASSOPACK: Stata module for lasso, square-root lasso, elastic net, ridge, adaptive lasso estimation and cross-validation

Author

Listed:
  • Achim Ahrens

    (Economic and Social Research Institute, Republic of Ireland)

  • Christian B. Hansen

    (University of Chicago)

  • Mark E Schaffer

    (Heriot-Watt University)

Programming Language

Stata

Abstract

LASSOPACK is a suite of programs for penalized regression methods suitable for the high-dimensional setting where the number of predictors p may be large and possibly greater than the number of observations. LASSOPACK supports both lasso and logistic lasso regression. The package consists of six main programs: lasso2 implements lasso, square-root lasso, elastic net, ridge regression, adaptive lasso and post-estimation OLS. cvlasso supports K-fold cross-validation and rolling cross-validation for cross-section, panel and time-series data. rlasso implements theory-driven penalization for the lasso and square-root lasso for cross-section and panel data. lassologit, cvlassologit and rlassologit are the corresponding programs for logistic lasso regression. The lasso (Least Absolute Shrinkage and Selection Operator, Tibshirani 1996), the square-root-lasso (Belloni et al. 2011) and the adaptive lasso (Zou 2006) are regularization methods that use L1 norm penalization to achieve sparse solutions: of the full set of p predictors, typically most will have coefficients set to zero. Ridge regression (Hoerl & Kennard 1970) relies on L2 norm penalization; the elastic net (Zou & Hastie 2005) uses a mix of L1 and L2 penalization. lasso2 implements all these estimators. rlasso uses the theory-driven penalization methodology of Belloni et al. (2012, 2013, 2014, 2016) for the lasso and square-root lasso. cvlasso implements K-fold cross-validation and h-step ahead rolling cross-validation (for time-series and panel data) to choose the penalization parameters for all the implemented estimators. lassologit, rlassologit and cvlassologit extend support to the case where the dependent variable is a binary response. In addition, rlasso implements the Chernozhukov et al. (2013) sup-score test of joint significance of the regressors that is suitable for the high-dimensional setting.

Suggested Citation

  • Achim Ahrens & Christian B. Hansen & Mark E Schaffer, 2018. "LASSOPACK: Stata module for lasso, square-root lasso, elastic net, ridge, adaptive lasso estimation and cross-validation," Statistical Software Components S458458, Boston College Department of Economics, revised 14 Dec 2020.
  • Handle: RePEc:boc:bocode:s458458
    Note: This module should be installed from within Stata by typing "ssc install lassopack". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
    as

    Download full text from publisher

    File URL: http://fmwww.bc.edu/repec/bocode/l/lassoutils.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/l/lasso2.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/l/lasso2_p.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/l/lasso2.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cvlasso.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cvlasso.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/r/rlasso.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cvlassologit.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/l/lassologit.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/r/rlassologit.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/l/lassologit_p.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/r/rlasso_p.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/r/rlasso.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/l/lassologit.ihlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/l/lassologit.sthlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_rlasso.do
    File Function: certification script
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_cvlasso.do
    File Function: certification script
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_lasso2.do
    File Function: certification script
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_cvlassologit.do
    File Function: certification script
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_rlassologit.do
    File Function: certification script
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_lassologit.do
    File Function: certification script
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_cvlasso.smcl
    File Function: certification script output
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_lasso2.smcl
    File Function: certification script output
    Download Restriction: no
    ---><---

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Oleksandr Faryna & Tho Pham & Oleksandr Talavera & Andriy Tsapin, 2020. "Wage Setting and Unemployment: Evidence from Online Job Vacancy Data," Economics Discussion Papers em-dp2020-02, Department of Economics, University of Reading.
    2. Sander Gerritsen & Mark Kattenberg & Sonny Kuijpers, 2019. "The impact of age at arrival on education and mental health," CPB Discussion Paper 389, CPB Netherlands Bureau for Economic Policy Analysis.
    3. Toews, Gerhard & Vezina, Pierre-Louis, 2020. "Enemies of the people," SocArXiv gnypr, Center for Open Science.
    4. Luis Aguiar Wicht & Joel Waldfogel & Sarah Waldfogel, 2018. "Playlisting Favorites: Is Spotify Gender-Biased?," JRC Working Papers on Digital Economy 2018-07, Joint Research Centre (Seville site).
    5. Park, Sujeong & Powell, David, 2021. "Is the rise in illicit opioids affecting labor supply and disability claiming rates?," Journal of Health Economics, Elsevier, vol. 76(C).
    6. Szabó-Morvai Ágnes & Hubert János Kiss, 2020. "Locus of control and Human Capital Investment Decisions: The Role of Effort, Parental Preferences and Financial Constraints," CERS-IE WORKING PAPERS 2055, Institute of Economics, Centre for Economic and Regional Studies.
    7. Bertrand, Marianne & Crépon, Bruno, 2020. "Teaching Labor Laws: Evidence From a Randomized Control Trial in South Africa," IZA Discussion Papers 13513, Institute of Labor Economics (IZA).
    8. Mustafa Caglayan & Oleksandr Talavera & Lin Xiong, 2020. "Female Small Business Owners in China: Discouraged, not Discriminated," Discussion Papers 20-04, Department of Economics, University of Birmingham.
    9. Mert Hakan Hekimoğlu & Burak Kazaz, 2020. "Analytics for Wine Futures: Realistic Prices," Production and Operations Management, Production and Operations Management Society, vol. 29(9), pages 2096-2120, September.
    10. Rossmann, Tobias, 2019. "Does Experience Shape Subjective Expectations?," Rationality and Competition Discussion Paper Series 181, CRC TRR 190 Rationality and Competition.
    11. Ryan Engstrom & David Newhouse & Vidhya Soundararajan, 2020. "Estimating small-area population density in Sri Lanka using surveys and Geo-spatial data," PLOS ONE, Public Library of Science, vol. 15(8), pages 1-20, August.
    12. Peter D. Lunn & Seán Lyons & Martin Murphy, 2020. "Predicting farms’ noncompliance with regulations on nitrate pollution," Journal of Environmental Planning and Management, Taylor & Francis Journals, vol. 63(13), pages 2313-2333, November.
    13. Mustafa Caglayan & Tho Pham & Oleksandr Talavera & Xiong Xiong, 2019. "Asset mispricing in loan secondary markets," Discussion Papers 19-07, Department of Economics, University of Birmingham.
    14. Sander Gerritsen & Mark Kattenberg & Sonny Kuijpers, 2019. "The impact of age at arrival on education and mental health," CPB Discussion Paper 389.rdf, CPB Netherlands Bureau for Economic Policy Analysis.
    15. Joana Cardim & Teresa Molina-Millán & Pedro C. Vicente, 2021. "Can technology improve the classroom experience in primary education? An African experiment on a worldwide program," NOVAFRICA Working Paper Series wp2101, Universidade Nova de Lisboa, Faculdade de Economia, NOVAFRICA.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:boc:bocode:s458458. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: . General contact details of provider: https://edirc.repec.org/data/debocus.html .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/debocus.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.