Panel Granger causality
Posted: Sat Jan 31, 2015 7:02 pm
Hi, I am trying to test for Granger causality in panel data with 4 variables (GDP, capital formation, labor, renewable energy use) and I have a panel of 24 countries from 1990 until 2012. I used the code for panelcause and changed some things but my results don't make sense. My variables are cointegrated so I was hoping to find the long term and short term relationship between the variables but all I get is a list of numbers. Here is the code and the results: Could someone help me and tell me what I am doing wrong here? Thanks a lot !!!
dec vect[strings] countries(24)
* Number of lags
*
compute p=3
*
*
* Joint test.
*
sweep(group=%indiv(t),var=hetero)
# ddgdp
# constant ddgdp{1 to p} ddcap{1 to p} ddlab{1 to p} ddre{1 to p}
compute loglunr=%logl,nregunr=%nregsystem
sweep(group=%indiv(t),var=hetero)
# ddgdp
# constant ddgdp{1 to p}
compute loglres=%logl,nregres=%nregsystem
cdf(title="Heterogeneous Panel Causality Test") chisqr 2.0*(loglunr-loglres) nregunr-nregres
Heterogeneous Panel Causality Test
Chi-Squared(216)= 554.432663 with Significance Level 0.00000000
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,19
linreg(noprint,smpl=%indiv(t)==i) ddgdp
# constant ddgdp{1 to p} ddcap{1 to p} ddlab{1 to p} ddre{1 to p}
exclude(noprint)
# ddcap{1 to p} ddlab{1 to p} ddre{1 to p}
compute lr=log((1+p*%cdstat/%ndf))*%nobs
report(row=new,atcol=1) countries(i) 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)
14.694 0.00210
2.903 0.40679
37.356 0.00000
17.087 0.00068
4.453 0.21651
12.683 0.00537
3.834 0.27993
8.576 0.03549
11.358 0.00994
5.235 0.15539
6.532 0.08839
4.940 0.17628
10.474 0.01494
22.798 0.00004
2.822 0.41987
4.467 0.21523
4.920 0.17773
6.867 0.07627
19.086 0.00026
OVERALL 554.433 0.00000
dec vect[strings] countries(24)
* Number of lags
*
compute p=3
*
*
* Joint test.
*
sweep(group=%indiv(t),var=hetero)
# ddgdp
# constant ddgdp{1 to p} ddcap{1 to p} ddlab{1 to p} ddre{1 to p}
compute loglunr=%logl,nregunr=%nregsystem
sweep(group=%indiv(t),var=hetero)
# ddgdp
# constant ddgdp{1 to p}
compute loglres=%logl,nregres=%nregsystem
cdf(title="Heterogeneous Panel Causality Test") chisqr 2.0*(loglunr-loglres) nregunr-nregres
Heterogeneous Panel Causality Test
Chi-Squared(216)= 554.432663 with Significance Level 0.00000000
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,19
linreg(noprint,smpl=%indiv(t)==i) ddgdp
# constant ddgdp{1 to p} ddcap{1 to p} ddlab{1 to p} ddre{1 to p}
exclude(noprint)
# ddcap{1 to p} ddlab{1 to p} ddre{1 to p}
compute lr=log((1+p*%cdstat/%ndf))*%nobs
report(row=new,atcol=1) countries(i) 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)
14.694 0.00210
2.903 0.40679
37.356 0.00000
17.087 0.00068
4.453 0.21651
12.683 0.00537
3.834 0.27993
8.576 0.03549
11.358 0.00994
5.235 0.15539
6.532 0.08839
4.940 0.17628
10.474 0.01494
22.798 0.00004
2.822 0.41987
4.467 0.21523
4.920 0.17773
6.867 0.07627
19.086 0.00026
OVERALL 554.433 0.00000