Skip to content
Prev 278942 / 398502 Next

forecasting linear regression from lagged variable

On Wed, Nov 30, 2011 at 4:40 PM, AaronB <aaron at communityattributes.com> wrote:
Its not clear that you can't use an arima model.  You would use the
n.ahead= argument of predict.Arima.

The dyn and dynlm packages handle lagged lm's of zoo objects but you
will have to do a predict and then append the prediction to the data
and repeat in a loop as you describe.  If you want to be careful about
error terms then its more complex.