Fits Least Angle Regression, Lasso and Infinitesimal Forward Stagewise regression models
These are all variants of Lasso, and provide the entire sequence of coefficients and fits, starting from zero, to the least squares fit.
(x, y, type = c("lasso", "lar", "forward.stagewise"), trace = F, Gram, eps = .Machine$double.eps, max.steps, use.Gram = T)
LARS is described in detail in Efron, Hastie, Johnstone and Tibshirani (2002). With the "lasso" option, it computes the complete lasso solution simultaneously for ALL values of the shrinkage parameter in the same computational cost as a least squares fit.
A "lars" object is returned, for which print, plot and predict methods exist.
Efron, Hastie, Johnstone and Tibshirani (2003) "Least Angle Regression"
(with discussion) Annals of Statistics; see also
print, plot, and predict methods for lars, and cv.lars
data(diabetes) par(mfrow=c(2,2)) attach(diabetes) object <- lars(x,y) plot(object) object2 <- lars(x,y,type="lar") plot(object2) object3 <- lars(x,y,type="for") # Can use abbreviations plot(object3) detach(diabetes)