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: forecasting y from a differenced arima model


From   "Brian P. Poi" <[email protected]>
To   [email protected]
Subject   Re: st: forecasting y from a differenced arima model
Date   Fri, 07 Oct 2011 15:49:02 -0500


Morning Jamba wrote:
I have 2 years of daily time series data.
I want a 31 day forecast, so I:
.tsappend, add(31)
I have observations for my iv1 that extend into this forecast period.
My problem, through way of a contrived illustration:
After estimating the following two models--
.arima depvar , arima (1,0,0)
.arima depvariv1 , arima (1,0,0)
--I can create dynamic forecasts in terms of the original depvar data units using
predict y,y
However predict y,y will not predict beyond one day when I have a differencing term:
.arima depvar, arima (1,1,0)
.arima depvar iv1 , arima (1,1,0)
What is the limitation I am encountering? Is there a way to predict the full 31 day period in a differenced ARIMAX model.
Don't think this is a methodological issue as it seems that if it is capable of predicting one day out, it should be able to predict 2, 3, or 31 days out as well. Im thinking I am missing some step to transform the stationary/differenced units estimated in the model back into the original units. I thought that predict y,y was supposed to handle this translation.

By default, -predict- after -arima- computes one-step-ahead forecasts, which use lagged values of the observed dependent variable. If lagged values of the dependent variable for a given time period are not available, then you can't make a forecast for that time period. Instead, you want to do dynamic forecasts, where lagged values of the forecast dependent variable are used when actual values aren't available. You use the dynamic() option with -predict- to get those:

. webuse air2
. gen lnair = ln(air)
. arima lnair, arima(1,1,0)
. tsappend, add(10)
. predict y1, y dynamic(145)
. predict y2, y
. tsline lnair y1 y2

y1 contains dynamic forecasts and goes out 10 periods into the future; y2 contains just the one-step-ahead forecasts. I specified dynamic(145) because the last time period for which lnair is observed is 144; dynamic(145) tells -predict- to use actual values of lnair for times less than 145 and to use forecast values for times 145 and higher.


Brian P. Poi
Senior Economist
StataCorp LP


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