2021年1月20日星期三

Stata timeseries rolling forecast

I'm new to Stata and have a question about its command language. I want to use my ARIMA model to forecast, ie use x[t], x[t-1]... to produce an estimate xhat[t+1], and then roll forward one time step, to make the next forecast, rebuilding the model every N time steps.

i can duplicate code, something like the following code for T, T+1, T+2, etc.:

 arima x if t<=T, arima(2,0,2)   predict xhat  

to produce a series of xhats to compare with in-sample x observations. There must be a more natural way to do this in the command language. any suggestions, pointers would be very much appreciated.

https://stackoverflow.com/questions/65820617/stata-timeseries-rolling-forecast January 21, 2021 at 11:06AM

没有评论:

发表评论