Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

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


From   Richard Herron <richard.c.herron@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Out of sample predictions and removing seasonal adjustments using ARIMA and predict
Date   Sat, 10 Sep 2011 12:23:24 -0400

I am switching to Stata from R having some difficulties with _predict_
and seasonal adjustments.

I generate a stationary series with a log-difference then a seasonal
correction. Next I fit an ARIMA model with which I would like to make
out of sample predictions.

(1) How do I append my predictions? I don't see an option in _predict_
and I can't figure out how to add observations.

(2) How do I undo seasonal adjustment? There is a clunky manual
solution, but it seems that I should use a built-in function or a
better ARIMA model to handle this.

Thanks!

* begin code
webuse friedman2, clear
generate ld_m1 = log(m1 / L.m1)
generate ld_m1_sa = S4.ld_m1
arima ld_m1_sa, ar(1) ma(4) noconstant
predict pred_ld_m1_sa if tin(1998q4, 2000q4), dynamic(q(1998q4))
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index