[R] out of sample forecast

Gabor Grothendieck ggrothendieck at gmail.com
Sat Feb 12 22:56:56 CET 2011


On Sat, Feb 12, 2011 at 4:08 PM, Paka yag <paka.y at web.de> wrote:
>
>   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!
>

See:

http://stackoverflow.com/questions/4856555/iteratively-forecasting-dyn-models/4858364#4858364


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list