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: ma(1) model, cannot explain the predicted values


From   [email protected]
To   [email protected]
Subject   Re: st: ma(1) model, cannot explain the predicted values
Date   Sun, 20 Nov 2011 16:20:57 +0100

Thanks for your answer, but I don't understand, what
g man_prede=_b[_cons]
replace man_prede = _b[ARMA:L.ma]*(L.D.wpi-L.man_prede) ///
        + _b[_cons] in 3/l
does?

well, it creates the variable man_prede with the constant term. Ok, then it replaces for each value with the coef.*(lag of the variable minus the predicted value) plus the constant term?
Mh, I don't get it.

I thought the normal ma(1) model is:
y(t)= constant + e(t) + coef.*e(t-1) ?

Zitat von Tirthankar Chakravarty <[email protected]>:

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,  <[email protected]> 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
[email protected]
[email protected]

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index