Announcement

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

  • How to get 95% CI for variable chosen by Lasso?

    Hi!

    I'm using the following code:

    Code:
    lassologit outcome i.(var1-var3) age time
    
    * Say Lasso cv indicates ID 142 as the best one
    lassoselect id = 142
    estimates store cv 
    
    * Then I use this to display the BIC
    lassoknots, display(nonzero, bic)
    
    * I select the one with the lowest BIC, lets say ID 127 
    lassoselect id = 127
    estimates store minBIC 
    
    * Plot cv-lambda vs minBIC lambda
    cvplot
    
    * Show odds ratios
    lassocoef cv minBIC, display(coef, postselection eform format(%6.2f))
    Everything works well and I do get the ORs for the variables selected by the two ID's. However, I do not get the confidence intervals. Any idea how to get these?

  • #2
    See #4: https://www.statalist.org/forums/for...ollowing-lasso. Run logistic to obtain odds ratios.

    Comment

    Working...
    X