Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error: ssc install: "dsregress" not found at SSC

    Hi there,

    I want to need a method for inference with variable selection.
    To do so, I tried the dsregress command to apply lasso variable selection and regression, modelled in the following notations

    Code:
     
      dsregress Y X1, controls(X2-X50) sel(cv)
    However, stata does not appear to identify this command and neither can I seem to install it.

    Code:
    
    . dsregress con_avg7day i.Stepone, controls( rate_pneumoniaml_death2018 rate_pneumoniafem_case20
    > 18 rate_pneumoniafem_death2018 rate_pneumoniatot_case2018 rate_pneumoniatot_death2018 rate_tb2
    > 018 rate_influenzacase_2018 rate_influenzadeath_2018 rate_hepcases_2018 rate_hepdeaths_2018 ra
    > te_diabetes2018) sel(cv)
    command dsregress is unrecognized
    r(199);
    
    . ssc install dsregress
    ssc install: "dsregress" not found at SSC, type search dsregress
    (To find all packages at SSC that start with d, type ssc describe d)
    r(601);
    Has this command been deleted and is there an alternate one? If not, what can be done here?

  • #2
    Indeed. The code for dsregress is not community-contributed and also not at SSC.

    dsregress is part of official Stata and was first added in Stata 16.

    It seems that you have a version of Stata not supporting dsregress and if so you must upgrade to be able to use it. See also the long-standing request at https://www.statalist.org/forums/help#version to tell us about use of a version before the most recent.

    Comment


    • #3
      Thanks Nick Cox. I'm using Stata 15.1, and have updated it. However, given the version that first added dsregress, I don't have access to it. As a student, I also cannot currently afford the update.

      Is there any other command that does what dsregress does for Stata versions before version 16?

      Comment


      • #4
        I'd look at

        SJ-20-1 st0594 . . Model selection and prediction with regularized regression
        . . . . . . . . . . . . . A. Ahrens, C. B. Hansen, and M. E. Schaffer
        (help cvlassologit, cvlasso, lasso2, lassologit, lassopack,
        rlassologit, rlasso if installed)
        Q1/20 SJ 20(1):176--235
        provides a suite of programs for regularized regression:
        lasso, square-root lasso, elastic net, ridge regression,
        adaptive lasso, and postestimation ordinary least squares


        to see if anything there helps.

        Comment


        • #5
          Thanks Nick Cox

          Comment

          Working...
          X