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 09 Jan 2024.
  • 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_lassologit_predict.do
    File Function: certification script
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cs_lassologit_weights.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. Toews, Gerhard & Vezina, Pierre-Louis, 2020. "Enemies of the people," SocArXiv gnypr, Center for Open Science.
    2. 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.
    3. Börschlein, Benjamin & Bossler, Mario, 2021. "A new machine learning-based treatment bite for long run minimum wage evaluations," VfS Annual Conference 2021 (Virtual Conference): Climate Economics 242441, Verein für Socialpolitik / German Economic Association.
    4. Faryna, Oleksandr & Pham, Tho & Talavera, Oleksandr & Tsapin, Andriy, 2020. "Wage Setting and Unemployment: Evidence from Online Job Vacancy Data," GLO Discussion Paper Series 503, Global Labor Organization (GLO).
    5. 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.
    6. 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.
    7. Caglayan, Mustafa & Talavera, Oleksandr & Xiong, Lin, 2022. "Female small business owners in China: Discouraged, not discriminated," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 80(C).
    8. 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).
    9. 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.
    10. 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.
    11. Marianne Bertrand & Bruno Crépon, 2021. "Teaching Labor Laws: Evidence from a Randomized Control Trial in South Africa," American Economic Journal: Applied Economics, American Economic Association, vol. 13(4), pages 125-149, October.
    12. 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.
    13. Rossmann, Tobias, 2019. "Does Experience Shape Subjective Expectations?," Rationality and Competition Discussion Paper Series 181, CRC TRR 190 Rationality and Competition.
    14. Ladina Knapp & David Wuepper & Robert Finger, 2021. "Preferences, personality, aspirations, and farmer behavior," Agricultural Economics, International Association of Agricultural Economists, vol. 52(6), pages 901-913, November.
    15. 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.
    16. Cardim, Joana & Molina-Millán, Teresa & Vicente, Pedro C., 2023. "Can technology improve the classroom experience in primary education? An African experiment on a worldwide program," Journal of Development Economics, Elsevier, vol. 164(C).

    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.

    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. RePEc uses bibliographic data supplied by the respective publishers.