Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: Out of sample predictions and removing seasonal adjustments using ARIMA and predict


From   Richard Herron <[email protected]>
To   [email protected]
Subject   Re: st: Re: Out of sample predictions and removing seasonal adjustments using ARIMA and predict
Date   Sun, 11 Sep 2011 16:47:58 -0400

The final pieces are:

(1) make the series stationary "on the fly" with _S4_ and _D_ so that
I can use _predict_ to get back the original series

(2) use _, y_ so that _predict_ returns the prediction in levels.

Here's the complete solution:

* begin code
webuse friedman2, clear
tsappend, last(2000q4) tsfmt(tq) // add observations
generate l_m1 = log(m1)
arima DS4.l_m1, ar(1) ma(4) noconstant
predict p_l_m1 if tin(1998q4, 2000q4), y dynamic(q(1998q3))
generate p_m1 = exp(p_l_m1)
* end code
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index