# lars

##### 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.

- Keywords
- regression

##### Usage

```
(x, y, type = c("lasso", "lar", "forward.stagewise"),
trace = F, Gram, eps = .Machine$double.eps, max.steps, use.Gram = T)
```

##### Details

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.

##### Value

A "lars" object is returned, for which print, plot and predict methods exist.

##### References

Efron, Hastie, Johnstone and Tibshirani (2003) "Least Angle Regression"
(with discussion) *Annals of Statistics*; see also

##### See Also

print, plot, and predict methods for lars, and cv.lars

##### Examples

```
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)
```

*Documentation reproduced from package lars, version 0.9-4, License: GPL version 2 or newer*