Statalist The Stata Listserver


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

Re: st: Is it safe?


From   da2147@columbia.edu
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Is it safe?
Date   Sun, 25 Feb 2007 21:00:35 -0500

Dear Clive

thanks very much for your reply. Actually what I was puzzled about
was the fact that the one-step-ahead forecasts I had calculated by
hand were not matching up with the results from the Stata <predict>
command. Since I assume I am calculating these the right way, it
makes me wonder what exactly Stata is giving me.

Divya

Quoting Clive Nicholas <crazeeclive@yahoo.co.uk>:

> 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/
>


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index