Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Is it safe?


From   Clive Nicholas <[email protected]>
To   [email protected]
Subject   st: Is it safe?
Date   Mon, 26 Feb 2007 00:41:51 +0000 (GMT)

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index