Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Morning Jamba <morningjamba@hotmail.com> |

To |
statalist <statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: forecasting y from a differenced arima model |

Date |
Fri, 7 Oct 2011 14:49:55 -0700 |

That does the trick. Thanks! ---------------------------------------- > Date: Fri, 7 Oct 2011 15:49:02 -0500 > From: bpoi@stata.com > To: statalist@hsphsun2.harvard.edu > Subject: Re: st: forecasting y from a differenced arima model > > > 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/ * * 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/

**References**:**st: forecasting y from a differenced arima model***From:*Morning Jamba <morningjamba@hotmail.com>

**Re: st: forecasting y from a differenced arima model***From:*"Brian P. Poi" <bpoi@stata.com>

- Prev by Date:
**st: recursive cointegration** - Next by Date:
**RE: st: recursive cointegration** - Previous by thread:
**Re: st: forecasting y from a differenced arima model** - Next by thread:
**st: New program -isa- is now available on SSC** - Index(es):