%mvgavge

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
ivory4
Posts: 144
Joined: Mon Aug 24, 2009 12:16 pm

%mvgavge

Unread post by ivory4 »

It is explained a little bit in VAdd and Appendix B.
Also used in extracting

Code: Select all

boxjenk(....define=xx) xxx
com mapoly = %eqnlagpoly(xx, %mvgavge)
What is extracted using %mvgavge?
I use SET a / =%mvgavge. It shows nothing.

If I need to calculate (1+%beta(3))/(1-%beta(2)) after fitting ARIMA(1,1,1), is it correct

Code: Select all

com mapoly = %eqnlagpoly(xx, %mvgavge)
com arpoly = %eqnlagpoly(xx, y)

com com psi1=%polyvalue(mapoly,1)/%polyvalue(arpoly,1)
But it seems not working
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: %mvgavge

Unread post by TomDoan »

ivory4 wrote:It is explained a little bit in VAdd and Appendix B.
Also used in extracting

Code: Select all

boxjenk(....define=xx) xxx
com mapoly = %eqnlagpoly(xx, %mvgavge)
What is extracted using %mvgavge?
I use SET a / =%mvgavge. It shows nothing.
It's not a series itself, but a special descriptor for the residuals in certain types of models.
ivory4 wrote: If I need to calculate (1+%beta(3))/(1-%beta(2)) after fitting ARIMA(1,1,1), is it correct

Code: Select all

com mapoly = %eqnlagpoly(xx, %mvgavge)
com arpoly = %eqnlagpoly(xx, y)

com com psi1=%polyvalue(mapoly,1)/%polyvalue(arpoly,1)
But it seems not working
That should be correct:

Input:

Code: Select all

all 100
seed 13430
set y = %ran(1.0)
boxjenk(ar=1,ma=1,constant,define=bbeq) y
compute mapoly=%eqnlagpoly(bbeq,%mvgavge)
compute arpoly=%eqnlagpoly(bbeq,y)
compute psi1=%polyvalue(mapoly,1)/%polyvalue(arpoly,1)
disp psi1
disp 2.117747/1.749825165

Output:


1.  CONSTANT                      0.006577036  0.088758699      0.07410  0.94108486
2.  AR{1}                        -0.749825165  0.047736721    -15.70751  0.00000000
3.  MA{1}                         1.117747488  0.043617580     25.62608  0.00000000

      1.21026
      1.21026
ivory4
Posts: 144
Joined: Mon Aug 24, 2009 12:16 pm

Re: %mvgavge

Unread post by ivory4 »

I am not sure what is wrong in this case

Code: Select all

calendar(q) 1979:1
open data japan79rgdp.xls
data(format=xls,org=columns) / rgdp
set rgdp  / = 100.0*log(rgdp)

  boxjenk(diffs=1,ar=1,ma=1,maxl,$
  constant,define=bbeq) rgdp
compute mapoly=%eqnlagpoly(bbeq,%mvgavge)
  compute arpoly=%eqnlagpoly(bbeq,rgdp)
display %polyvalue(mapoly,1)/%polyvalue(arpoly,1)
display (1+%beta(2))/(1-%beta(3))
Results:

Variable Coeff Std Error T-Stat Signif
********************************************************************************
1. CONSTANT 0.764442812 0.267839078 2.85411 0.00586058
2. AR{1} 0.918498499 0.154688083 5.93775 0.00000014
3. MA{1} -0.773436855 0.223787014 -3.45613 0.00099491

NA
1.08180
Attachments
Copy of japan79rgdp.xls
(25 KiB) Downloaded 740 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: %mvgavge

Unread post by TomDoan »

You're estimating the equation with the DIFFS option. The AR polynomial will include the 1-L operator, so your denominator will be zero. You'll have to estimate the equation on the differenced data, rather than the non-stationary data.
Post Reply