## a program for ADF test with two dummy variables

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

eisamabodian
Posts: 13
Joined: Tue Aug 05, 2014 3:50 am

### a program for ADF test with two dummy variables

I want to simulate this ADF unit root test with two dummy variables in intercept and trend.

Code: Select all

`dy=c(1)+C(2)*DU1+c(3)*DU2+C(4)*DUT1+C(5)*DUT2+C(6)*T+C(7)*Y(-1)+C(7)*DY(-1) `

Does anybody can help me.My original model has two dummy variables.
And 219 observations.

DU1=structural break is in 153th observation
DU2=structural break is in 173th observation

for example a simulation program with 20000 replications.
I must calculate critical values at 1%,5% and 10% significance level.
i wrote this program to this end with 10000 observations and 10000 replications.

Code: Select all

`wfcreate  u    1    10000rndseed  12345series   tau_statistic1series   tau_statistic2series   tau_statistic3series  dum2=@recode(@date>=@dateval("   6941   "),1,0)    "6941  is structural break dateseries  dum5=@recode(@date>=@dateval("  7900  "),1,0)       "7900  is structural  break dateseries  dumt2=dum2*@trendseries  dumt5=dum5*@trendfor !i=1  to  10000smpl  @first   @firstseries  y=0smpl  @first+1    @lastseries  y=y(-1)+nrndseries  dy=y-y(-1)equation   equ1.ls  dy c  y(-1)  dum2  dum5  dy(-1)   dy(-2)  dy(-3)  dumt2   dumt5  @trendtau_statistic1(!i)=equ1.@tstats(2)equation   equ2.ls  dy c  y(-1)  dum2  dum5  dy(-1)   dy(-2)  dy(-3)    dumt2   dumt5  tau_statistic2(!i)=equ2.@tstats(2)equation   equ3.ls  dy    dum2       y(-1)    dum5  dy(-1)   dy(-2)  dy(-3)    dumt2   dumt5  tau_statistic3(!i)=equ3.@tstats(2)nextsmpl   @first    @lastscalar    k1=@quantile(tau_statistic1,0.01)scalar    k2=@quantile(tau_statistic1,0.05)scalar    k3=@quantile(tau_statistic1,0.1)scalar    k4=@quantile(tau_statistic2,0.01)scalar    k5=@quantile(tau_statistic2,0.05)scalar    k6=@quantile(tau_statistic2,0.1)scalar    k7=@quantile(tau_statistic3,0.01)scalar    k8=@quantile(tau_statistic3,0.05)scalar    k9=@quantile(tau_statistic3,0.1)table(5,5)   zzzzzzzz(1,2)="none"zzzz(1,3)="intercept"zzzz(1,4)="intercept & trend"zzzz(2,1)="1%"zzzz(3,1)="5%"zzzz(4,1)="10%"zzzz(2,4)=k1zzzz(3,4)=k2zzzz(4,4)=k3zzzz(2,3)=k4zzzz(3,3)=k5zzzz(4,3)=k6zzzz(2,2)=k7zzzz(3,2)=k8zzzz(4,2)=k9`

Now i want to run this program with 10000 replications and 219 observations.