Announcement

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

  • Lasso for variable selection - no group option

    Stata's built in Lasso for variable selection (for example dsregress) treats all variables separately and thus may keep some categories of a factor variable but remove others - which is nonsensical.
    There might also be groups of variables that only make sense if present together in the model.

    A group-lasso (for example gglasso in R https://cran.r-project.org/web/packa...sso/index.html) allows users to specify groups of variables, such that a model either includes both or neither.
    Is there anyway to do this in Stata, and if not, are there any plans to implement this in the near future?


  • #2
    Originally posted by Ariel Karlinsky View Post
    Stata's built in Lasso for variable selection (for example dsregress) treats all variables separately and thus may keep some categories of a factor variable but remove others - which is nonsensical.
    Is it really? You will find many cases where only some levels of a categorical variable are kept, depending on the focus. The following is a table from Rodrick's 1998 Journal of Political Economy paper. Of all the world's regions, he keeps indicators for Latin America, East Asia and Sub-Saharan Africa.



    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	140.4 KB
ID:	1676372

    Comment

    Working...
    X