[R] out of sample forecast

Paka yag paka.y at web.de
Sat Feb 12 22:08:11 CET 2011


   Hello

I have model that is: lm(y~ lag(x, -1) + lag(z, -1)
so basically a time series regression with exogen variables
And I want to make rolling out of sample forecasts, meaning that:

I first use a subsample (e.g. 1990 -1995) for estimating, then I perform a one step ahead forecast, then I add one observation and make another one step ahead forecast and so on

I have tried to work with rollapply and defining the model as arima(0,0,0) with xreg=lags of the other varibles, but that doesnt work. 

Please, if you could point me to a solution, your help is much appreciated!

Chris



More information about the R-help mailing list