Ng - Perron UR test loop

For questions regarding programming in the EViews programming language.

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

Posts: 5
Joined: Wed Aug 17, 2016 8:05 pm

Ng - Perron UR test loop

Postby kdom20 » Sun Aug 02, 2020 6:48 pm

I am trying to compute the Ng - Perron unit root test for many series.

Based on an ADF loop posted in this forum, I tried the following but it does not produce results for all the tests. Any help in fixing this is appreciated. Thanks.

Code: Select all

group g * not resid                                                 'put every series in the workfile into a group
Table NgP

for !i=1 to g.@count                                   'loop through every series in the first group
%name = g.@seriesname(!i)                        'grab the current series name

uroot(np, hac=ardt, lagmethod=maic, maxlag=6,save=level1) {%name}
NgP(2, 1+!i)= level1(3,1)'

uroot(exog=trend, np, hac=ardt, lagmethod=maic, maxlag=6,save=level2) {%name}
NgP(3, 1+!i)= level2(3,1)

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 18 guests