Divya asked:
I'm trying to fit some ARMA models to some time-series data I have
and trying to make one-step-ahead forecasts with the following
commands:
arima x, arima(1,0,0) //a simple AR(1) model
predict xhat, xb
[...]
Sticking to your set commands and skipping over the autoregressive parameter = .25, this will work:
. webuse sp500, clear
. tsset date
. arima volume, arima(1,0,0)
. predict static if tin(02jan2001,31dec2001), y
A nice touch is to graph your one-step-ahead forecasts against the observed trend, thus:
. tsline volume static if tin(02jan2001,31dec2001), scheme(economist) legend(cols(1) stack)
Hope that helps,
Clive Nicholas
___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/