pgrangertest {plm} | R Documentation |
Test for Granger causality in panel data.
pgrangertest(formula, data, test = c("Ztilde", "Zbar", "Wbar"), order = 1L, index = NULL)
formula |
a |
data |
a |
test |
a character to request the statistic to be returned, either
|
order |
integer(s) giving the number of lags to include in the test's auxiliary regressions, the length of order must be either 1 (same lag order for all individuals) or equal to the number of individuals (to specify a lag order per individual), |
index |
only relevant if |
The panel Granger causality test is a combination of Granger tests (Granger (1969)) performed per individual. The test is developed by Dumitrescu/Hurlin (2012), a shorter exposition is given in Lopez/Weber (2017).
The formula formula
describes the direction of the (panel) Granger
causation where y ~ x
means "x (panel) Granger causes y".
By setting argument test
to either "Ztilde"
(default) or "Zbar"
,
two different statistics can be requested. "Ztilde"
gives the standardised
statistic recommended by Dumitrescu/Hurlin (2012) for fixed T samples. If set to
"Wbar"
, the intermediate Wbar statistic (average of individual Granger
chi-square statistics) is given which is used to derive the other two.
The Zbar statistic is not suitable for unbalanced panels. For the Wbar statistic, no p-value is available.
The implementation uses grangertest
from package
lmtest to perform the individual Granger tests.
An object of class c("pgrangertest", "htest")
. Besides the usual
elements of a htest
object, it contains element indgranger
which
carries the Granger test statistics along their p-values, degrees of freedom and
the specified lag order per individual as a data frame.
Kevin Tappe
Dumitrescu, E.-I./Hurlin, C. (2012), Testing for Granger non–causality in heterogeneous panels, Economic Modelling, 29(4), pp. 1450–460.
Granger, C. W. J. (1969), Investigating Causal Relations by Econometric Models and Cross–spectral Methods, Econometrica, 37(3), pp. 424–438.
Lopez, L./Weber, S. (2017), Testing for Granger causality in panel data, IRENE Working paper 17-03, September 11, 2017.
grangertest
for the Granger causality test in lmtest,
## not meaningful, just to demonstrate usage ## H0: 'value' Granger causes 'inv' for all invididuals data("Grunfeld", package = "plm") pgrangertest(inv ~ value, data = Grunfeld) pgrangertest(inv ~ value, data = Grunfeld, order = 2L) pgrangertest(inv ~ value, data = Grunfeld, order = 2L, test = "Zbar") # varying lag order (last individual lag order 3, others lag order 2) pgrangertest(inv ~ value, data = Grunfeld, order = c(rep(2L, 9), 3L))