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

Postby eisamabodian » Fri Jul 15, 2016 2:15 am

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    10000
rndseed  12345

series   tau_statistic1
series   tau_statistic2
series   tau_statistic3


series  dum2=@recode(@date>=@dateval("   6941   "),1,0)    "6941  is structural break date
series  dum5=@recode(@date>=@dateval("  7900  "),1,0)       "7900  is structural  break date
series  dumt2=dum2*@trend
series  dumt5=dum5*@trend


for !i=1  to  10000
smpl  @first   @first
series  y=0
smpl  @first+1    @last
series  y=y(-1)+nrnd
series  dy=y-y(-1)

equation   equ1.ls  dy c  y(-1)  dum2  dum5  dy(-1)   dy(-2)  dy(-3)  dumt2   dumt5  @trend
tau_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)
next




smpl   @first    @last
scalar    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)   zzzz
zzzz(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)=k1
zzzz(3,4)=k2
zzzz(4,4)=k3

zzzz(2,3)=k4
zzzz(3,3)=k5
zzzz(4,3)=k6

zzzz(2,2)=k7
zzzz(3,2)=k8
zzzz(4,2)=k9




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

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 20 guests