Page 1 of 5

Granger Causality Tests with Panel Data

Posted: Tue May 29, 2012 5:48 pm
by e1983
Hi. I was curious if someone could point me to an example or discussion regarding the granger causality tests in panel data?

Re: Granger Causality Tests with Panel Data

Posted: Wed May 30, 2012 10:26 am
by TomDoan
e1983 wrote:Hi. I was curious if someone could point me to an example or discussion regarding the granger causality tests in panel data?
Holtz-Eakin, Newey and Rosen mention the possibility of Granger causality tests in their panel VAR methodology. Since they are doing (very) small T-large N data sets, the lag coefficients are homogeneous across individuals (only the intercepts vary) so the test is the rather obvious Wald test on the lag coefficients.

For the more typical situation where you might do a causality test (macro data), the N will be quite a bit smaller and T much larger. Assuming a homogeneous VAR probably makes little sense in those situations. I've seen a few papers which allowed heterogeneity in the "other" lags (the ones being tested) while imposing homogeneity on the own lags and on the residual variances. To me, that makes little sense. Under the alternative that the "others" are non-zero, there is no reason to expect the own lags to be the same across individuals—they're reduced form parameters, not structural. Allowing everything to be heterogeneous, the joint LR test on the lags is actually just the sum of individual LR tests. An example is (now) provided in PANELCAUSE.RPF.

Re: Granger Causality Tests with Panel Data

Posted: Tue Jul 10, 2012 10:31 pm
by guo
Dear

Thank you so much for your precious time and attention.

Concerning the panel causality test, I wrote the program, and there are some problems in running it:

Code: Select all

OPEN DATA "D:\Electro New\panel rearragment 2012-7-8.xlsx"
CALENDAR(M) 2003:2
DATA(FORMAT=XLSX,ORG=COLUMNS,right=100) 2003:02 2012:04
pform x
# individual_1 to individual_96
calendar(m,panel=2012:3) 2003:2
all 96//2012:3
pform(repeat) p_new
# p
pform(repeat) n_new
# n
*Panel causallity analysis
dec vec[string] individual(2)
input individual(2)
individual_1
individual_2

* Number of lags
com p=3

* Joint test.
*
sweep(group=%indiv(t),var=hetero)
# x
# constant x{1 to p} p{1 to p}  n{1 to p}
compute loglunr=%logl,nregunr=%nregsystem
sweep(group=%indiv(t),var=hetero)
# x
# constant x{1 to p}
compute loglres=%logl,nregres=%nregsystem
cdf(title="Heterogeneous Panel Causality Test") chisqr 2.0*(loglunr-loglres) nregunr-nregres
compute jointtest=%cdstat,jointsignif=%signif
*
* Individual causality tests. The individual log likelihood ratios sum
* to the joint test.
*
report(action=define,title="Panel Causality Test")
do i=1,96
   linreg(noprint,smpl=%indiv(t)==i) x
   # constant x{1 to p} p{1 to p} n{1 to p}
   exclude(noprint)
   # p{1 to p} n{1 to p}

   compute lr=log((1+p*%cdstat/%ndf))*%nobs
   report(row=new,atcol=1) individual_1 lr %chisqr(lr,p)
end do i
report(row=new,atcol=1) "OVERALL" jointtest jointsignif
report(atcol=2,tocol=2,action=format,picture="*.###")
report(atcol=3,tocol=3,action=format,picture="*.#####")
report(action=show)
My questions is:

I want to get the panel causality results for short-term and long-term for X, P and N, how can I revise the program?

Thank you very much.

Best Regards

guo

Re: Granger Causality Tests with Panel Data

Posted: Wed Jul 11, 2012 10:08 am
by TomDoan
You have a very simple test for long-run non-causality—your data aren't I(1), therefore they aren't cointegrated, therefore there is no long-run causality. The "short-run" causality would be tested as described earlier in the thread.

Re: Granger Causality Tests with Panel Data

Posted: Sun Jul 15, 2012 12:54 am
by guo
Dear Tom,

Thank you very much for all of your help.

Concerning Panel Granger Causality Test, the first step is to estimate the long-run equilibrium relations: Xit=Ai+DELTAit+GAMA1i*P+GAMA2i*N+Uit

Here is my question:

For panel data, if I want to get the first step: long-run residual, shall I use

Code: Select all

pregress(method=random) commodity / resids
# constant p n
or

Code: Select all

lin(define=spread) commodity / resids 
# constant p n
Thank you so much for your always kind suggestion.

Best Regards

guo

Re: Granger Causality Tests with Panel Data

Posted: Sun Jul 15, 2012 11:42 am
by TomDoan
If your data aren't I(1), there is no long-run equilibrium relationship to estimate; there is no long-run causality. There is no need to test further for it, in fact, the test will give a misleading result when applied to stationary data.

Re: Granger Causality Tests with Panel Data

Posted: Sun Jul 15, 2012 7:29 pm
by guo
Dear e1983,

Thank you so much for your kind reply.

Right now I use level data, and they are I(1). So I applied panel VECM to them.

Based on this condition, when I want to get long term equilibrium, which syntax I should use: "Linreg" or "Pregress" ?

I am very looking forward to your suggestion.

Best Regards

guo

Re: Granger Causality Tests with Panel Data

Posted: Sun Jul 15, 2012 8:20 pm
by moderator
You would use PREGRESS to take care of the individual effects. However, you wouldn't use METHOD=RANDOM. Use fixed effects instead.

Re: Granger Causality Tests with Panel Data

Posted: Mon Feb 20, 2017 1:14 am
by sanjeev
Dear Tom,
With reference to my previous post,could you please let me know some reference for panel causality tests which could be useful to interpret the results?

Thanks.

Re: Granger Causality Tests with Panel Data

Posted: Mon Feb 20, 2017 11:03 am
by TomDoan
sanjeev wrote:Dear Tom,
With reference to my previous post,could you please let me know some reference for panel causality tests which could be useful to interpret the results?

Thanks.
It's described above in the thread, and it's covered in the Panel Data e-course.

Re: Granger Causality Tests with Panel Data

Posted: Wed Feb 22, 2017 2:22 am
by sanjeev
Dear Tom,
II have two queries regarding panel granger causality tests as follwos:
First of all, what is the "significance level" as reported under the output of the test?
Secondly,while conducting the test between two variables,how do we know about the direction of causality?
Please reply soon!

Thanks.
Regards.

Re: Granger Causality Tests with Panel Data

Posted: Wed Feb 22, 2017 9:58 am
by TomDoan
sanjeev wrote:Dear Tom,
II have two queries regarding panel granger causality tests as follwos:
First of all, what is the "significance level" as reported under the output of the test?
It's the significance level of the test for causality. The null is "no causality" so a significant result would have you reject non-causality in favor of causality.
sanjeev wrote: Secondly,while conducting the test between two variables,how do we know about the direction of causality?
It's the direction you program into it. The example is for real money (m) causing output (y).

Re: Granger Causality Tests with Panel Data

Posted: Fri Apr 21, 2017 4:11 am
by sanjeev
Dear Tom,
I ran panel granger causality on my data and I got the following result which is not making sense to me.Could you please help?
Heterogeneous Panel Causality Test
Chi-Squared(24)= 173.899291 with Significance Level 0.00000000

1.000000 2.444 0.48552
1.000000 4.540 0.20879
1.000000 3.932 0.26889
1.000000 0.181 0.98055
1.000000 1.043 0.79090
1.000000 1.002 0.80069
1.000000 3.818 0.28181
1.000000 8.880 0.03093
OVERALL 173.899 0.00000

How come overall statistic is so large while individual statistics are so small?

Re: Granger Causality Tests with Panel Data

Posted: Fri Apr 21, 2017 7:50 am
by TomDoan
Most likely because you made a mistake. The joint test statistic should be the sum of the individual test statistics. Most likely you have the joint and individual tests going in different ways.

Re: Granger Causality Tests with Panel Data

Posted: Sat Apr 22, 2017 4:09 am
by sanjeev
Thanks! I got my mistake and have got the right results now!
Can you please tell me if the results from granger causality and those from panel cointegration in a multivariate model comparable? I ask this because granger causality is done pairwise while panel cointegration and FMOLS can have a larger model as well.


Regards.