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.
The command of dsregress generally reads as
Code:
dsregress depvar varsofinterest, controls([(alwaysvars)] othervars)
I was wondering where the conceptual difference lies between varsofinterest and alwaysvars? From my understanding, both sets of variables are treated identically from a computational perspective. Only the produced output is different.
However, if I run
Code:
dsregress Y X1-X50, controls(Z1-Z100) sel(cv)
Code:
dsregress Y X1, controls((X2-X50) Z1-Z100) sel(cv)
As I interpret the dsregress command, both approaches should always include X1-X50 and select among Z1-Z100.
However, there seems to be a difference between both lines.
Can anybody clarify on this? Thank you!
0 Response to Difference between varsofinterest and alwaysvars in Stata's dsregress command
Post a Comment