Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone help me understand the forward stagewise part in the LARS algorithm? I was reading the R code and could not figure out what is updateR and downdateR doing.

share|improve this question
up vote 0 down vote accepted

Even without looking at the code, I bet I can guess.

The code is calculating what the R matrix in the QR decomposition is, from that for the previous model with one fewer or one additional predictor (X-) variable (update and downdate, respectively).

It can be computed from an adjacent model much more efficiently than computing it from scratch.

With many predictors, the speedup can be substantial.

For example the downdate probably uses either Givens rotations or Householder transforms to in effect reorder the variables, placing the to-be dropped variable last (and from where it can be ignored).

The book by Golub and Van Loan is probably a good place to get more information, but you could try something like this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.