Description Usage Arguments Details Value Author(s) References See Also Examples

These are all variants of Lasso, and provide the entire sequence of coefficients and fits, starting from zero, to the least squares fit.

1 2 |

`x` |
matrix of predictors |

`y` |
response |

`type` |
One of "lasso", "lar", "forward.stagewise" or "stepwise". The names can be abbreviated to any unique substring. Default is "lasso". |

`trace` |
If TRUE, lars prints out its progress |

`normalize` |
If TRUE, each variable is standardized to have unit L2 norm, otherwise it is left alone. Default is TRUE. |

`intercept` |
if TRUE, an intercept is included in the model (and not penalized), otherwise no intercept is included. Default is TRUE. |

`Gram` |
The X'X matrix; useful for repeated runs (bootstrap) where a large X'X stays the same. |

`eps` |
An effective zero |

`max.steps` |
Limit the number of steps taken; the default is |

`use.Gram` |
When the number m of variables is very large, i.e. larger than N, then you may not want LARS to precompute the Gram matrix. Default is use.Gram=TRUE |

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 "stepwise" option has recently been added to LARS.

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

Brad Efron and Trevor Hastie

Efron, Hastie, Johnstone and Tibshirani (2003) "Least Angle Regression"
(with discussion) *Annals of Statistics*; see also http://www-stat.stanford.edu/~hastie/Papers/LARS/LeastAngle_2002.pdf.
Hastie, Tibshirani and Friedman (2002) Elements of Statistical
Learning, Springer, NY.

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

1 2 3 4 5 6 7 8 9 10 |

```
Loaded lars 1.2
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.