Dear Stata community,
An aspect of the -lasso linear- command that is leaving me perplexed. I am running the following :
where cat is a categorical variable with 10 categories, while $controls is a vector of controls. to view the results, I run
However, I am surprised to see that the first two categories of cat are omitted from the list of coefficients provided by the command. The macro (stored from the lasso command) e(allvars_sel), only contains the following:
What is the reason for this? I would expect one category to be omitted if it served as a base category, but not two. Could this affect results of the lasso command?
Thank you in advance
An aspect of the -lasso linear- command that is leaving me perplexed. I am running the following :
Code:
lasso linear (i.cat var1 var2) $controls, nolog rseed(123) selection(plugin)
Code:
lassocoef
Code:
3.cat 4.cat 5.cat 6.cat 7.cat 8.cat 9.cat 10.cat var1 var2 ...
What is the reason for this? I would expect one category to be omitted if it served as a base category, but not two. Could this affect results of the lasso command?
Thank you in advance
Comment