December 13, 2023

Just when I was about to try out boosting and bagging in Stata (rforest and boost), I realized that most programs now require Stata 15 or newer. Even Lasso penalization has been integrated in the core modeling facilities starting with Stata 18. At least, I can still run lassopack to perform L1, L2 regularization or a combination thereof. They use the same convention as in glmnet, where the parameter $\alpha$ stands for the elasticnet mixing parameter ($\alpha=0$ corresponds to the ridge penalty while $\alpha=1$ is the lasso penalty). The authors compared Stata builtin and R regularized estimation, which is great: Replication of glmnet and StataCorp’s lasso. See also An introduction to the lasso in Stata on the Stata blog. #stata