Translating the S-Plus Least Angle Regression package to Mata
In an attempt to learn Mata I have translated the LARS package, written for R by Trevor Hastie and Brad Efron, into Mata. The LARS package is an efficient implementation of an entire lasso sequence with the cost of a single least-squares estimation. Mata and R/S+ are incredibly similar in terms of syntax and on the whole can be translated by altering the syntax “wording”, however, there was the occasional need for additional functions. It is certainly not the best approach to learning a new language. I shall describe the new Stata command and apply this approach to model selection to some nutrition data.