This thread is about the HEGY addin which performs seasonal unit root tests. The addin works with biannual, quarterly or monthly data. The addin contains the option to obtain the critical value by Monte Carlo, time of the simulations depend mostly on the number of observations but in general they are not time consuming. Additionally, the addin has the option to obtain the tabulated critical values by:
Philip Hans Franses and Bart Hobijn. Critical values for unit root tests in seasonal time series. Journal of Applied Statistics, 24(1):25_48, 1997.
Svend Hylleberg, Robert F Engle, Clive WJ Granger, and Byung Sam Yoo. Seasonal integration and cointegration. Journal of econometrics, 44(1):215_238, 1990.
Attached you can find the addin documentation and the data examples. Comments and suggestions of the addin are welcomed.
Regards, Nicolas Ronderos Pulido
HEGY*
Moderators: EViews Gareth, EViews Moderator, EViews Esther

 Posts: 202
 Joined: Tue Jul 17, 2012 9:47 am
Re: HEGY*
This is a wonderfully useful addin. If you have considered writing an addin for the Canova Hansen test (possibly based on the R package ndiffs), please feel free to send me a PM, as it's something I'd be keen to collaborate on.
Best wishes!
Charlie
Best wishes!
Charlie
Re: HEGY*
hi,
very useful Addin you did a great work , i have some suggestions:
1 could you add Critical values tstat 1% & 2.5% & 10%, the test do it just with 5%;
2 can extend this Addin to do the Fstat for all various frequency, Philip Hans & al " Critical values for unit root tests in seasonal time series" Journal of Applied Statistics, 24(1) pp 3136, 1997;
3add the Nonseasonal and all seasonal unit roots test critical value when it may sometimes be required monthly time series filtered, Philip Hans & al, op. cit., pp 3639;
4add Osborn test with critical value Philip Hans & al, op. cit., pp 3943, and critical value to Seasonal unit roots and structural breaks Philip Hans & al, op. cit., pp 4346;
5 how can show seasonal regression test with estimation object equation (in the workfile after estimation), I know that the regression test is in the spool object;
i hope that you consider my suggestions, if this Addin do this all test it would be perfect.
Kind Regards,
very useful Addin you did a great work , i have some suggestions:
1 could you add Critical values tstat 1% & 2.5% & 10%, the test do it just with 5%;
2 can extend this Addin to do the Fstat for all various frequency, Philip Hans & al " Critical values for unit root tests in seasonal time series" Journal of Applied Statistics, 24(1) pp 3136, 1997;
3add the Nonseasonal and all seasonal unit roots test critical value when it may sometimes be required monthly time series filtered, Philip Hans & al, op. cit., pp 3639;
4add Osborn test with critical value Philip Hans & al, op. cit., pp 3943, and critical value to Seasonal unit roots and structural breaks Philip Hans & al, op. cit., pp 4346;
5 how can show seasonal regression test with estimation object equation (in the workfile after estimation), I know that the regression test is in the spool object;
i hope that you consider my suggestions, if this Addin do this all test it would be perfect.
Kind Regards,
Re: HEGY*
Hi ecofin,
Thanks for your suggestions, number 1,2,3 and 5 are straightforward to implement. But for the moment you can obtain the pvalue using the Monte Carlo option (for your request number 1) and run the regression with the same specification as showed in the spool (for your request number 5). Do you want the output of the regression to analyze the residuals?
Best regards,
Thanks for your suggestions, number 1,2,3 and 5 are straightforward to implement. But for the moment you can obtain the pvalue using the Monte Carlo option (for your request number 1) and run the regression with the same specification as showed in the spool (for your request number 5). Do you want the output of the regression to analyze the residuals?
Best regards,
Re: HEGY*
Hi NicolasR,
thanks for your reply
1 yes i want the output of the regression to analyse the residuals by the equation object ; (show the equation object in the workfile and in the spool object with the test), can you help me with this;
2 i have seen that in Gretl software we can estimate Hegy by two additional methodes (constant+ tirigonometric terms & constant+tirigonometric terms+ trend), the package GHegy can do the test by 6 methodes (4 methods include in the Addin Now), you can look if you can Add this two methods in the Addin, see the article below and the link of the packeges (General seasonal unit roots tests (HEGY) and Pvalues http://ricardo.ecn.wfu.edu/gretl/cgibi ... /GHegy.zip).
Kind Regards.
thanks for your reply
1 yes i want the output of the regression to analyse the residuals by the equation object ; (show the equation object in the workfile and in the spool object with the test), can you help me with this;
2 i have seen that in Gretl software we can estimate Hegy by two additional methodes (constant+ tirigonometric terms & constant+tirigonometric terms+ trend), the package GHegy can do the test by 6 methodes (4 methods include in the Addin Now), you can look if you can Add this two methods in the Addin, see the article below and the link of the packeges (General seasonal unit roots tests (HEGY) and Pvalues http://ricardo.ecn.wfu.edu/gretl/cgibi ... /GHegy.zip).
Kind Regards.
 Attachments

 Numerical distribution functions for seasonal unit root tests.pdf
 (403.42 KiB) Downloaded 165 times
Re: HEGY*
Hi all,
I'm a bit confused about the interpretation of HEGY seasonal unit root tests in case of monthly data.
From my personal thought:
 the seasonal unit root with 2 month per cycle corresponds to the frequency of the root pi
 the seasonal unit root with 4 month per cycle corresponds to the frequency of the root pi/2
 the seasonal unit root with 2.4 month per cycle corresponds to the frequency of the root 2pi/3
 the seasonal unit root with 12 month per cycle corresponds to the frequency of the root pi/3 and so on.
Could you let me know whether my thought is correct? Thanks a lot
I'm a bit confused about the interpretation of HEGY seasonal unit root tests in case of monthly data.
From my personal thought:
 the seasonal unit root with 2 month per cycle corresponds to the frequency of the root pi
 the seasonal unit root with 4 month per cycle corresponds to the frequency of the root pi/2
 the seasonal unit root with 2.4 month per cycle corresponds to the frequency of the root 2pi/3
 the seasonal unit root with 12 month per cycle corresponds to the frequency of the root pi/3 and so on.
Could you let me know whether my thought is correct? Thanks a lot
Re: HEGY*
Hi,
You can calculate the frecuency from the equation w=2*pi*f where f is given in cycles per time unit (in the addin I report the inverse 1/f i.e. in time units per cycle) you want the w frequency. For the frequencys you posted:
 (2 month per cycle) w=2*pi*f w=2*pi*(1/2) w=pi
 (4 month per cycle) w=2*pi*f w=2*pi*(1/4) w=pi/2
 (2.4 month per cycle or five cycles in a year) w=2*pi*f w=2*pi*(1/2.4) w=5*pi/6
 (12 month per cycle) w=2*pi*f w=2*pi*(1/12) w=pi/6
Also from the spectral point of view the theoretical spectra of the process Yt=A*Yt12+Et (which contains all the seasonal unit roots for A=1) is given by 1/(1+A^22*A*cos(12*w)) if you plot a graph of that you will see each root at their frequency.
Regards,
You can calculate the frecuency from the equation w=2*pi*f where f is given in cycles per time unit (in the addin I report the inverse 1/f i.e. in time units per cycle) you want the w frequency. For the frequencys you posted:
 (2 month per cycle) w=2*pi*f w=2*pi*(1/2) w=pi
 (4 month per cycle) w=2*pi*f w=2*pi*(1/4) w=pi/2
 (2.4 month per cycle or five cycles in a year) w=2*pi*f w=2*pi*(1/2.4) w=5*pi/6
 (12 month per cycle) w=2*pi*f w=2*pi*(1/12) w=pi/6
Also from the spectral point of view the theoretical spectra of the process Yt=A*Yt12+Et (which contains all the seasonal unit roots for A=1) is given by 1/(1+A^22*A*cos(12*w)) if you plot a graph of that you will see each root at their frequency.
Regards,
Who is online
Users browsing this forum: No registered users and 3 guests