Page 1 of 1

ARMA model with dummy variable

Posted: Tue Dec 29, 2009 11:45 am
by minijim
Hi,

I tried to run an equation with an autoregressive model and a dummy variable (in order to be able to observe a shock in the regression after the period 34)
equation eq.ls data c dummy ar(1) ar(1)*dummy
with dummy equal to : series dummy=(@trend>34)

but there is an error message "AR is not defined".
I think I could use the equation
equation eq.ls data c dummy data(-1) data(-1)*dummy
instead of the first one, but I would like to get the inversed roots of the AR polynomial of the regression to check the stability of the model (and I am not sure that the use of data(-1) would be a great idea for the model at the period 35).

Is there a way to run the regression with the dummy variable and the AR terms ?

Thanks in advance
(i have eviews version 5)

Re: ARMA model with dummy variable

Posted: Tue Dec 29, 2009 11:52 am
by EViews Gareth
I can't think of a way to do this in EViews 5.

Re: ARMA model with dummy variable

Posted: Tue Dec 29, 2009 3:07 pm
by EViews Glenn
I think this will do it...It's the translation of the model into NLLS with provisions for dummies in the AR process. I've dashed this off pretty quickly so you should check that I have all of the terms in the right place.

smpl if @trend<>35
equation eq1.ls y=(c(3)+c(4)*dummy)*y(-1)+(1-(c(3)+c(4)*dummy))*c(1)+(x-(c(3)+c(4)*dummy)*x(-1))*c(2)

Note that this doesn't include the dummy in the mean, only in the AR. You should be able to add the former with little trouble.

Re: ARMA model with dummy variable

Posted: Tue Dec 29, 2009 3:24 pm
by startz
Two small things.

(1) If you really are doing AR(1), then the inverse root is just the reciprocal of the AR coefficient.
(2) Glenn dropped the observation at the breakpoint, which may or may not be what you want to do.

Re: ARMA model with dummy variable

Posted: Tue Dec 29, 2009 4:07 pm
by EViews Glenn
Startz's comment on (2) is correct. I took the original poster's comment about handling the seam and dealt with it by dropping the observation, though that is not necessarily the best nor only way of handling it...