Fitted Values from ARMA

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.
John_Val
Posts: 25
Joined: Sun May 17, 2009 2:18 pm

Fitted Values from ARMA

Unread post by John_Val »

Hello,
I am trying to compute fitted values from an estimated ARMA model, but my results are not correct.


boxjenk(constant,ar=1,ma=1,inputs=0,iter=1000,define=equation) dsp 1995:1 2008:12 res1
set fitted = 0.0
do t=1995:3,2008:12
com fitted(t)= %beta(1) + %beta(2)*dsp(t-1) + %beta(3)*res1(t-1)
end do

set fit = dsp-res1

The difference between fitted and fit is always equal to -1.42, starting from 1995:3 onwards.
Am I computing fitted wrong?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Fitted Values from ARMA

Unread post by TomDoan »

The constant in the BOXJENK formulation is the process mean, not the intercept in an ARMA equation. To convert that into the form you're using, the equivalent representation is:

y-%beta(1) = %beta(2)*(y{1}-%beta(1))+eps+%beta(3)*eps{1}

or

y = %beta(1)*(1-%beta(2))+%beta(2)*y{1}+eps+%beta(3)*eps{1}

So instead of using %beta(1) as the intercept, use %beta(1)*(1-%beta(2)).

BTW, the PRJ instruction will work after a BOXJENK. You could just do

prj fitted 1995:3 2008:12

instead of the loop.
Post Reply