Title

[xt] xtgrangert -- Testing for Granger non-causality in heterogeneous panel data models, using the methodology developed by Juodis, Karavias, and Sarafidis (2021).

Syntax

xtgrangert depvar [indepvars] [if] [in]
[, lags(integer) maxlags(integer) het bootstrap[(options)] sum nodfc lagoverlap]

You must xtset your data before using xtgrangert; see [XT] xtset.
Unbalanced panels are allowed in which case the variance for the calculation of the HPJ statistic is
bootstrapped.

Description

xtgrangert performs the Half-Panel Jackknife (HPJ) Wald-type test for Granger non-causality, developed by Juodis, Karavias, and Sarafidis (2021).
This test offers superior size and power performance, which stems from the use of a pooled estimator with a sqrt(NT) rate of convergence.
The test has two other useful properties; it can be used in multivariate systems and it has power against both homogeneous as well as heterogeneous alternatives.
The test allows for cross-sectional dependence and cross-sectional heteroskedasticity.
The command also reports results for the HPJ estimator with overlapping half panels.
In the presence of cross-sectional dependence the variance of the HPJ estimator can be obtained by bootstrapping.
The bootstrap resamples across the cross-sectional dimension.

xtgrangert internally adds lags of the dependent variable with heterogeneous slope coefficients when calculating the HPJ test statistic and estimating the HPJ estimator.
The lags are partialled out and their estimation results are not presented in the output.

Options

Main

lags() specifies the number of lags of dependent and independent variables to be added to the regression. If lags() is not specified, the default is lags(1).
The lags of the dependent variable are partialled out.

maxlags() specifies the upper bound of lags. The BIC criterion is used to select the number of lags that provides the best model fit. lags() and maxlags() cannot be used at the same time.

lagoverlap allows lags to overlap between the half panels.

SE/Robust

het allows for cross-sectional heteroskedasticity.

nodfc does not apply a degrees of freedom correction in the computation of the variance-covariance matrix of the HPJ estimator. This option is mostly useful under cross-sectional heteroskedasticity.

Bootstrap

bootstrap employs a bootstrap variance estimator in the HPJ Wald statistic, statistic, which allows for cross-sectional dependence. 100 repetitions are used based on the current seed.

bootstrap(#reps, seed(seed)) employs a bootstrap variance estimator in the HPJ Wald statistic, which allows for cross-sectional dependence with a custom seed and #reps repetitions.

Reporting

sum presents results on the sum of the estimated feedback coefficients. This option can be useful when the number of lags is greater than 1.

Stored results

xtgrangert stores the following in e():

Scalars

e(N) Number of individual units

e(T) Number of time periods

e(p) Number of lags

e(BIC) BIC values

e(W_HPJ) The Wald test statistic

e(pvalue) P-value for the HPJ Wald test

Matrices

e(b_HPJ) The HPJ coefficient estimator

e(Var_HPJ) The variance-covariance matrix of the HPJ estimator

e(b_Sum_HPJ) Sum of the HPJ estimates for the feedback coefficients

e(Var_Sum_HPJ) The variance of the sum of the HPJ estimators

Postestimation commands

Predict can be used after xtgrangert. The residuals and predicted values will be stored in newvar.

predict newvar [if] [in]
[, residuals xb]

Postestimation options

residuals: calculates the residuals.

xb calculates the linear prediction on the partialled out variables.

Examples

The dataset ``xtgrangert_example.dta'' used in this example is downloadable from
https://sites.google.com/site/yianniskaravias/files/xtgranger.

xtset the data

xtset cert time

Dynamic model with given lags

xtgrangert roa inefficiency quality, lags(2)

Dynamic model with given lags, cross-sectional heteroskedasticity-robust standard errors

xtgrangert roa inefficiency quality, lags(2) het

Dynamic model with given lags and cross-sectional heteroskedasticity-robust standard errors. It reports the sum of the lagged coefficients

xtgrangert roa inefficiency quality, lags(2) het sum

Dynamic model with lag length selection (up to 4 lags) based on BIC, with cross-sectional heteroskedasticity-robust standard errors

xtgrangert roa inefficiency quality, maxlags(4) het

Dynamic model with lag length selection (up to 4 lags) based on BIC, with cross-sectional heteroskedasticity-robust standard errors, and no variance degrees-of-freedom correction

xtgrangert roa inefficiency quality, maxlags(4) het nodfc

Bootstrap variance of the HPJ estimator that allows for cross-sectional dependence,
with a default of 100 repetitions

xtgrangert roa inefficiency quality, bootstrap

Bootstrap variance of the HPJ estimator that allows for cross-sectional dependence,
with 200 repetitions and control of the seed

xtgrangert roa inefficiency quality, bootstrap(200, seed(123))

References

Dhaene, G., Jochmans, K., 2015. Split-panel Jackknife estimation of fixed-effect models. Rev Econ Stud, 82:991–1030

Juodis, A., Karavias, Y., and Sarafidis, V., 2021. A homogeneous approach to testing for Granger non-causality in heterogeneous panels. Empir Econ 60, 93–112. https://doi.org/10.1007/s00181-020-01970-9

Xiao, J., Juodis, A., Karavias, Y., Sarafidis, V., and Ditzen, J., 2022. Improved Tests for Granger Causality in Panel Data. Submitted to the Stata Journal.

Acknowledgements

xtgrangert is not an official Stata command. It is a free contribution to the research community.
Please cite Xiao et al (2022) and Juodis et al (2021), as listed in the references above.
xtgrangert was previously called xtgranger.

Authors

Jiaqi Xiao

University of Birmingham

Birmingham, UK

Jxx963@outlook.com

Arturas Juodis

University of Amsterdam

Amsterdam, Netherlands

a.juodis@uva.nl

Yiannis Karavias

University of Birmingham

Birmingham, UK

i.Karavias@bham.ac.uk

Vasilis Sarafidis

BI Norwegian Business School

Oslo, Norway

vasilis.sarafidis@bi.no

Jan Ditzen

Free University of Bozen-Bolzano

Bozen, Italy

jan.ditzen@unibz.it

Version

This version 1.13 - 09.01.2023

Change Log

Version 1.12 to 1.13

- added unbalanced panel support

- default is non overlapping panels

- added Option lagoverlap to allow for overlaps when using lags