error in Dumitrescu Hurlin test in Eviews 9?
Moderators: EViews Gareth, EViews Jason, EViews Moderator
error in Dumitrescu Hurlin test in Eviews 9?
This paper (https://www.unine.ch/files/live/sites/i ... P1703.pdf) claims there is an error in Eviews 8 Dumitrescu Hurlin causality test code. Did you fix that for Eviews 9?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11731
 Joined: Tue Sep 16, 2008 5:38 pm
Re: error in Dumitrescu Hurlin test in Eviews 9?
We do not believe it is a bug in our code. We'll post more details soon.
Follow us on Twitter @IHSEViews

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11731
 Joined: Tue Sep 16, 2008 5:38 pm
Re: error in Dumitrescu Hurlin test in Eviews 9?
We'll go into even more detail at a later date, but to prove the results we're getting, here's some EViews code that computes the Wald statistics that they compute on page 8 of their paper.
And here is some Stata code that produces the same things using Stata's built in Wald test and Granger Causality functions:
You can see that EViews produces exactly the same individual Wald statistics as Stata does, and that the EViews produced W statistic is the average of those individual Wald statistics.
Code: Select all
wfopen .\data_demo.dta
pagestruct id @date(t)
'compute granger causality using built in
group g y x
show g.cause(1, dh)
'loop through the crosssections calculating Wald test for each individual
!n = 10
matrix(!n,2) walds
for !i=1 to !n
smpl if @crossid=!i
freeze(mode=overwrite, temp) g.cause(1) 'built in Granger Causality Test
walds(!i,1) = temp(8,3)
equation eq1.ls y c y(1) x(1) 'manually calculate using least squares
freeze(mode=overwrite, temp) eq1.wald c(3)=0
walds(!i,2) = temp(7,2)
next
smpl @all
'display individual walds and their average
show walds
=@cmean(walds)
'means are equal (to a number of decimal places), and match the Wstat given in the built in procedure.
And here is some Stata code that produces the same things using Stata's built in Wald test and Granger Causality functions:
Code: Select all
clear
use "data_demo.dta", clear
xtset id t
xtgcause y x
mat W = J(10,2,0)
forvalues i = 1/10{
regress y L.y L.x if id==`i'
test L.x
matrix W[`i',1]=r(F)
var y x if id==`i', lags(1/1) dfk small
vargranger
matrix a=r(gstats)
matrix W[`i',2]=a[1,1]
}
matlist W
You can see that EViews produces exactly the same individual Wald statistics as Stata does, and that the EViews produced W statistic is the average of those individual Wald statistics.
 Attachments

 data_demo.dta
 (4.26 KiB) Downloaded 42 times
Follow us on Twitter @IHSEViews
Re: error in Dumitrescu Hurlin test in Eviews 9?
Thanks for that.
Did you check the Z statistics?
Did you check the Z statistics?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11731
 Joined: Tue Sep 16, 2008 5:38 pm
Re: error in Dumitrescu Hurlin test in Eviews 9?
Yes, they are also correct.
Follow us on Twitter @IHSEViews

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11731
 Joined: Tue Sep 16, 2008 5:38 pm
Re: error in Dumitrescu Hurlin test in Eviews 9?
Dumitrescu and Hurlin have now updated their code so that it matches EViews.
Follow us on Twitter @IHSEViews
Re: error in Dumitrescu Hurlin test in Eviews 9?
Dear Mateus, Dear Gareth,
We are the authors of the paper that raised the issue.
Following your previous posts, we have carefully investigated the difference between the results obtained with Eviews and our Stata command (xtgcause). As correctly indicated by M. Gareth, it turns out that the differences arise because of small sample adjustments, which were implemented in Eviews but not in xtgcause.
We therefore apologize for incorrectly judging Eviews’ command in our paper and for the trouble this may have caused.
We have already implemented a new version of the Stata command xtgcause that calculates the Wald and Z statistics with small sample adjustments. The output coincides with Eviews'. The new version of the command is attached to this post.
We are now updating the working paper and will replace the version currently online (dated 22Feb2017) as soon as possible.
We thank both of you for raising and discussing the issue.
Luciano Lopez and Sylvain Weber
We are the authors of the paper that raised the issue.
Following your previous posts, we have carefully investigated the difference between the results obtained with Eviews and our Stata command (xtgcause). As correctly indicated by M. Gareth, it turns out that the differences arise because of small sample adjustments, which were implemented in Eviews but not in xtgcause.
We therefore apologize for incorrectly judging Eviews’ command in our paper and for the trouble this may have caused.
We have already implemented a new version of the Stata command xtgcause that calculates the Wald and Z statistics with small sample adjustments. The output coincides with Eviews'. The new version of the command is attached to this post.
We are now updating the working paper and will replace the version currently online (dated 22Feb2017) as soon as possible.
We thank both of you for raising and discussing the issue.
Luciano Lopez and Sylvain Weber
 Attachments

 xtgcause_2.0.zip
 Package xtgcause, version 2.0
 (4.39 KiB) Downloaded 50 times
Who is online
Users browsing this forum: Google [Bot] and 4 guests