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]
st: Re: Out of sample predictions and removing seasonal adjustments using ARIMA and predict
From
Richard Herron <[email protected]>
To
[email protected]
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/