GregoryHansen Cointegration Test
Moderators: EViews Gareth, EViews Moderator

 Posts: 1
 Joined: Wed Feb 10, 2010 7:10 pm
Re: GregoryHansen Cointegration Test
dear trubador,
thank you for your effort and contribution to our forum with your very helpful GH test code.
i'm new to eviews and try to run your code to test cointegration between real exports (seasonally adjusted, rx_sa) and real import+ (seasonally adjusted, rmm_sa) but there's a error message: "!type mismatch at argument 2 in "call greghansen(rx_sa,rmm_sa,2,"aic",5)" whenever i run the code.
pls tell my why and how i can resolve it,
thank you very much.
thank you for your effort and contribution to our forum with your very helpful GH test code.
i'm new to eviews and try to run your code to test cointegration between real exports (seasonally adjusted, rx_sa) and real import+ (seasonally adjusted, rmm_sa) but there's a error message: "!type mismatch at argument 2 in "call greghansen(rx_sa,rmm_sa,2,"aic",5)" whenever i run the code.
pls tell my why and how i can resolve it,
thank you very much.
 Attachments

 greghansen.prg
 (4.74 KiB) Downloaded 859 times

 greghansen test.wf1
 (8.73 KiB) Downloaded 747 times
Re: GregoryHansen Cointegration Test
dear trubador,
I am getting the same error message: "!type mismatch at argument 2 in "call greghansen(x,y,2,"aic",5)" whenever i run the code.
Could you please help to resolve the problem.
Kinga
I am getting the same error message: "!type mismatch at argument 2 in "call greghansen(x,y,2,"aic",5)" whenever i run the code.
Could you please help to resolve the problem.
Kinga
Re: GregoryHansen Cointegration Test
Hi,
I would greteful if anyone could help me.I use eviews 6.0 and I am trying to run the code on the regression:int(dependent variable) inf(only one independent variable).I have tryied to do this and here are my eviews archives.I can't spot where is the mistake.
Thanks in advance
I would greteful if anyone could help me.I use eviews 6.0 and I am trying to run the code on the regression:int(dependent variable) inf(only one independent variable).I have tryied to do this and here are my eviews archives.I can't spot where is the mistake.
Thanks in advance
 Attachments

 program.prg
 (4.84 KiB) Downloaded 669 times

 thesis.wf1
 (13.76 KiB) Downloaded 626 times
Re: GregoryHansen Cointegration Test
Dear Eviews administrator,
I was wondering if you could tell me what is the cointegration factor of Gregory Hansen test? I am thinking the result is like Johansen test result but it is not. The program results in only the break position and its statistical test. How many cointegration and the equation of that do not appear. Or I am wrong in understanding this test. Pls explain to me. Thanks.
I was wondering if you could tell me what is the cointegration factor of Gregory Hansen test? I am thinking the result is like Johansen test result but it is not. The program results in only the break position and its statistical test. How many cointegration and the equation of that do not appear. Or I am wrong in understanding this test. Pls explain to me. Thanks.
Re: GregoryHansen Cointegration Test
Hi,
what is the Phillips procedure in the Gregory Hansen Cointegration Test?
Thank You
what is the Phillips procedure in the Gregory Hansen Cointegration Test?
Thank You
Re: GregoryHansen Cointegration Test
jjaa wrote:Hi,
what is the Phillips procedure in the Gregory Hansen Cointegration Test?
Thank You
You should refer to the original paper cited in the beginning of the code...
Re: GregoryHansen Cointegration Test
[quote="trubador"][quote="jjaa"]Hi,
Dear trubador,
Thank you for your attention and It's my great honor to introduce myself. My name is Adder,a Chinese postgraduate student. I am writting a paper now (the data I used is time series) , which should be estimated by the method of FMOLS. I want to use the GregoryHansen test based on the method of FMOLS to detect the structural break, but I don't know how to get it. I know you have once given the GregoryHansen test program in this forumm,but that program is based on the OLS. Can you give me some help? I am using the Eviews 6.Thank you very much.
Dear trubador,
Thank you for your attention and It's my great honor to introduce myself. My name is Adder,a Chinese postgraduate student. I am writting a paper now (the data I used is time series) , which should be estimated by the method of FMOLS. I want to use the GregoryHansen test based on the method of FMOLS to detect the structural break, but I don't know how to get it. I know you have once given the GregoryHansen test program in this forumm,but that program is based on the OLS. Can you give me some help? I am using the Eviews 6.Thank you very much.
Re: GregoryHansen Cointegration Test
Hi everyone,
I am carrying out a study on the longrun relationship between imports and exports of a country to check whether its current account balance is sustainable or not.
My series are real exports and real imports, quarterly data from 1970Q1 to 2010Q4.
I already did the Johansen cointegration test for the whole sample and for a subsample from 1970Q1 to 2007Q4 (so ending when the last financial crisis started, more or less). The test gave me no cointegration for the whole sample but cointegration with 1 cointegrating vector when analyzing the subsample.
I did the GH test with the program troubadour posted, testing the whole sample for all of the models available and changing the program accordingly as follows
group independents
independents.add real_mm
call greghansen(real_x,independents,3,"aic",6)
(this is the example for model n. 3)
This is an example of an output I got:
THE GREGORYHANSEN
COINTEGRATION TEST
MODEL 3: Level Shift with Trend
ADF Procedure
tstat 4.326451
Lag 1.000000
Break 1995Q1
Phillips Procedure
Zastat 54.95626
Zabreak 1995Q1
Ztstat 5.918280
Ztbreak 1995Q1
Looking at the critical values provided by G&H 1996, table 1, it looks like the ADF does not reject the null of no cointegration while the Za and Zt stats reject it.
Now, my question is: which procedure should I check in order to decide whether there is cointegration or not? How can I choose?
Thank you for your help
Cherry
I am carrying out a study on the longrun relationship between imports and exports of a country to check whether its current account balance is sustainable or not.
My series are real exports and real imports, quarterly data from 1970Q1 to 2010Q4.
I already did the Johansen cointegration test for the whole sample and for a subsample from 1970Q1 to 2007Q4 (so ending when the last financial crisis started, more or less). The test gave me no cointegration for the whole sample but cointegration with 1 cointegrating vector when analyzing the subsample.
I did the GH test with the program troubadour posted, testing the whole sample for all of the models available and changing the program accordingly as follows
group independents
independents.add real_mm
call greghansen(real_x,independents,3,"aic",6)
(this is the example for model n. 3)
This is an example of an output I got:
THE GREGORYHANSEN
COINTEGRATION TEST
MODEL 3: Level Shift with Trend
ADF Procedure
tstat 4.326451
Lag 1.000000
Break 1995Q1
Phillips Procedure
Zastat 54.95626
Zabreak 1995Q1
Ztstat 5.918280
Ztbreak 1995Q1
Looking at the critical values provided by G&H 1996, table 1, it looks like the ADF does not reject the null of no cointegration while the Za and Zt stats reject it.
Now, my question is: which procedure should I check in order to decide whether there is cointegration or not? How can I choose?
Thank you for your help
Cherry
Re: GregoryHansen Cointegration Test
Hello, is there anyone able to help me on this?
Thanks,
Cherry
Thanks,
Cherry
echerry wrote:Hi everyone,
I am carrying out a study on the longrun relationship between imports and exports of a country to check whether its current account balance is sustainable or not.
My series are real exports and real imports, quarterly data from 1970Q1 to 2010Q4.
I already did the Johansen cointegration test for the whole sample and for a subsample from 1970Q1 to 2007Q4 (so ending when the last financial crisis started, more or less). The test gave me no cointegration for the whole sample but cointegration with 1 cointegrating vector when analyzing the subsample.
I did the GH test with the program troubadour posted, testing the whole sample for all of the models available and changing the program accordingly as follows
group independents
independents.add real_mm
call greghansen(real_x,independents,3,"aic",6)
(this is the example for model n. 3)
This is an example of an output I got:
THE GREGORYHANSEN
COINTEGRATION TEST
MODEL 3: Level Shift with Trend
ADF Procedure
tstat 4.326451
Lag 1.000000
Break 1995Q1
Phillips Procedure
Zastat 54.95626
Zabreak 1995Q1
Ztstat 5.918280
Ztbreak 1995Q1
Looking at the critical values provided by G&H 1996, table 1, it looks like the ADF does not reject the null of no cointegration while the Za and Zt stats reject it.
Now, my question is: which procedure should I check in order to decide whether there is cointegration or not? How can I choose?
Thank you for your help
Cherry
Re: GregoryHansen Cointegration Test
Hi iam using eviews to investigate co integration among corruption, economic growth and poverty
my problems i dont know how to extract trace statistics and maximal value from the result obtained in the eview
my problems i dont know how to extract trace statistics and maximal value from the result obtained in the eview
Re: GregoryHansen Cointegration Test
Hi i here by summit result from eview for the data of 1996 to 2011 i dont know how separate trace statistics and maximal value from the result
i will be grateful for your kind help
i will be grateful for your kind help
 Attachments

 RESULT.docx
 (13.43 KiB) Downloaded 469 times

 DATA ON CAUSALITY STUDY.docx
 I have attached the data and the result can any one help me in indicating which one is supposed to my trace statistics and maximal value
 (11.34 KiB) Downloaded 458 times
Re: GregoryHansen Cointegration Test
dandume wrote:Hi i here by summit result from eview for the data of 1996 to 2011 i dont know how separate trace statistics and maximal value from the result
Your question has nothing to do with GH Cointegration test. Anyway, in my opinion, the number of observations are too small to conduct such an analysis. According to your output, 0.807608 is the Eigenvalue and 33.06752 is the trace statistic. Rest of the output is pretty selfexplanatory...
Re: GregoryHansen Cointegration Test
Still looking for help with this, is there anyone who can answer my question?
Thanks a lot
Cherry
Thanks a lot
Cherry
echerry wrote:Hello, is there anyone able to help me on this?
Thanks,
Cherryecherry wrote:Hi everyone,
I am carrying out a study on the longrun relationship between imports and exports of a country to check whether its current account balance is sustainable or not.
My series are real exports and real imports, quarterly data from 1970Q1 to 2010Q4.
I already did the Johansen cointegration test for the whole sample and for a subsample from 1970Q1 to 2007Q4 (so ending when the last financial crisis started, more or less). The test gave me no cointegration for the whole sample but cointegration with 1 cointegrating vector when analyzing the subsample.
I did the GH test with the program troubadour posted, testing the whole sample for all of the models available and changing the program accordingly as follows
group independents
independents.add real_mm
call greghansen(real_x,independents,3,"aic",6)
(this is the example for model n. 3)
This is an example of an output I got:
THE GREGORYHANSEN
COINTEGRATION TEST
MODEL 3: Level Shift with Trend
ADF Procedure
tstat 4.326451
Lag 1.000000
Break 1995Q1
Phillips Procedure
Zastat 54.95626
Zabreak 1995Q1
Ztstat 5.918280
Ztbreak 1995Q1
Looking at the critical values provided by G&H 1996, table 1, it looks like the ADF does not reject the null of no cointegration while the Za and Zt stats reject it.
Now, my question is: which procedure should I check in order to decide whether there is cointegration or not? How can I choose?
Thank you for your help
Cherry

 Posts: 2
 Joined: Wed Nov 07, 2012 2:55 pm
Re: GregoryHansen Cointegration Test
Trubador, thank you very much for you helpful program. Although, I am currently working on my masterthesis, so I would need some kind of source I can refer to when using this code. Is there any journal article or something where you published your program, where I can refer to? Thanks a lot in advance.
Re: GregoryHansen Cointegration Test
JeremyHenrichs wrote:Is there any journal article or something where you published your program, where I can refer to?
Sİnce the code has first been made available in the forum, you can use the website itself as a reference. I am not sure which citation rules you should follow, but something along the following lines would be more than enough I believe:
Code: Select all
Ocakverdi, E. and Tang, C.F. (2009). GregoryHansen Cointegration Test EViews Source Code. http://forums.eviews.com/viewtopic.php?f=15&t=976#p3427
Return to “Program Repository”
Who is online
Users browsing this forum: No registered users and 2 guests