Dear Trubador,

Thank you for your time spent and willingness to help me. Regarding the unit root programme, I encountered some problems within the programme written for Zivot-Andrews unit root for a group of series. According to your advice, I have came out the following code for group of series:

Code: Select all

`Group g lnm2 lny r lnex`

table ZAZ

for !kk = 1 to g.@count

%name = g.@seriesname(!kk)

series Y = {%name}

!trim = 0.15 'Trimming parameter

!t_min = 1000

!min_aic = 1000

vector(1) breaks

series DY = D(Y)

for !lag=0 to 4

for !i = @round(@obs(Y)*!trim) to @round(@obs(Y)*(1-!trim))

if !lag = 0 then

equation temp.ls DY Y(-1) C @trend (@trend>!i)

else

equation temp.ls DY Y(-1) C @trend (@trend>!i) DY(-1 to -!lag)

endif

if temp.@aic < !min_aic then

!best_lag = !lag

!min_aic = temp.@aic

if temp.@tstats(1) < !t_min then

!t_min = temp.@tstats(1)

breaks(1) = !i+2 'Identified first break point.

series DU1 = @trend> !i

if !best_lag = 0 then

equation ZA.ls DY Y(-1) C @trend DU1 'Selected equation

else

equation ZA.ls DY Y(-1) C @trend DU1 DY(-1 to -!best_lag) 'Selected equation

endif

endif

endif

next

next

ZAZ(1,1) = "Variables"

setline(ZAZ, 2)

ZAZ(3,1) = "t-stat"

ZAZ(4,1) = "Lag"

ZAZ(5,1) = "Breaks1"

ZAZ(6,1) = "DU1-tstat"

ZAZ(1,1+!kk) = %name

ZAZ(3,1+!kk) = ZA.@tstat(1)

ZAZ(4,1+!kk) = !best_lag

ZAZ(5,1+!kk) = breaks(1)

ZAZ(6,1+!kk) = @tstat(4)

next

delete temp

show ZAZ

Regret to inform that, the lag length shows in table "ZAZ(4,1)" is not the lag order used to compute the ZA test. For example, if I run the programe without grouping the series(i.e. individual series programme) then the lag length show on the estimated equation output is zero, while when I use the above command its lag length has been changed to three (3). How can I modified the programme code, thus the results in table ZAZ become consistent to the output?

Apart from that, for table "ZAZ(6,1)", I have programmed to show the t-statistics for the dummy variables, but is it plausible to show p-value?

Finally, why the "setline(ZAZ, 2)" command does not perform for the last variable result? - For your information, this is not an important issue, don't spend to much time at this stage.

Thank you in advance,

Warmest regards,

tcfoon