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]

From |
Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: ma(1) model, cannot explain the predicted values |

Date |
Sun, 20 Nov 2011 02:55:59 -0800 |

You haven't taken care of the initial conditions in your predictions. The following example shows you how to construct the predictions manually in the way that Stata does. This uses the fact that the unconditional prediction is the the estimate of the intercept: ********************************** webuse wpi1, clear arima D.wpi, ma(1) predict stata_pred, xb g man_prede=_b[_cons] replace man_prede = _b[ARMA:L.ma]*(L.D.wpi-L.man_prede) /// + _b[_cons] in 3/l li ********************************** T On Sun, Nov 20, 2011 at 1:59 AM, <corn@mail.tu-berlin.de> wrote: > Hello, > I want understand ma(q) processes. Thats why I made up an example for > myself. I have one time series variable called SIE with 20 values (from > 08.10.2002 up to 04.11.2002) and the a corresponding variable with time > data. > first, I type > > tsset time > (time is my time variable) > > then I want a ma(1) model, so I type > arima SIE, ma(1) > > I get an output, which says that my coef. of the constant is 41.72032 and my > coef. of my maL1. is 1. > > Now, I want to have a look at the values, so I type > predict values, xb > predict residuen, residuals > > and the list > and my proplem now is: I want to control these values by calculating them by > myself: > The first values of SIE are: > 08.10.2002 32.05 > 09.10.2002 32.42 > > the predicted values (variable "values") are > 08.10.2002 41.72032 > 09.10.2002 36.88516 > > and the residuals > > 08.10.2002 -9.670321 > 09.10.2002 -4.465162 > > now I tried to calculate: > I thought ma(1) means: > y(1) = constant +e(1)+coef.*e(0) = 41.72032 + (-9.670321) + 1*0= 32.05 > ok this works, now y(2): > y(2) = constant + e(2)+coef.*e(1) > so y(2) = 41.72032 + -4.465162 + 1*-9.670321 but this is not 36.88516 ? > Please, can you explain, how to get the value 36.88516? I dont see it.... > > Thanks a lot! > > * > * 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/ > -- Tirthankar Chakravarty tchakravarty@ucsd.edu tirthankar.chakravarty@gmail.com * * 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/

**Follow-Ups**:**Re: st: ma(1) model, cannot explain the predicted values***From:*corn@mail.tu-berlin.de

**References**:**st: ma(1) model, cannot explain the predicted values***From:*corn@mail.tu-berlin.de

- Prev by Date:
**st: means compairison with weights and unequal variance** - Next by Date:
**Re: st: means compairison with weights and unequal variance** - Previous by thread:
**st: ma(1) model, cannot explain the predicted values** - Next by thread:
**Re: st: ma(1) model, cannot explain the predicted values** - Index(es):