Announcement

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

  • dsregress controls selected

    Hi. This is the first time I am using the dsregress command. I included 68 controls of which only 22 were selected. Is there anyway for me to know which 22 were selected and why the remaining were not selected here?

    Thanks.

    Code:
     dsregress rate_con_avg7day stepone, controls($demo $health $healthsys $econ)
    
    Estimating lasso for rate_con_avg7day using plugin
    Estimating lasso for stepone using plugin
    
    Double-selection linear model         Number of obs               =      1,019
                                          Number of controls          =         68
                                          Number of selected controls =         22
                                          Wald chi2(1)                =     220.93
                                          Prob > chi2                 =     0.0000
    
    ------------------------------------------------------------------------------
                 |               Robust
    rate_con_a~y | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
         stepone |   4.146641   .2789798    14.86   0.000     3.599851    4.693431
    ------------------------------------------------------------------------------
    Note: Chi-squared test is a Wald test of the coefficients of the variables
          of interest jointly equal to zero. Lassos select controls for model
          estimation. Type lassoinfo to see number of selected variables in each
          lasso.

  • #2
    Code:
    display e(controls_sel)
    See

    Code:
    ereturn list
    after running the command to view the stored results. For your second question, the estimator uses Lasso to select variables and then estimates a model based on the selected variables. If you want to include all variables, it does not make sense to use dsregress, just use regress. If you are not familiar with Lasso, start at

    Code:
    help lasso intro
    Last edited by Andrew Musau; 18 Jul 2023, 02:04.

    Comment


    • #3
      Thanks Andrew Musau. I greatly appreciate it.

      Comment

      Working...
      X