为了解释说明 xtgcause,首先使用 Dumitrescu 和 Hurlin (2012) 提供的 [数据] 。可以直接从网站将数据导入 Stata。在原始 CSV 表格中,数据是矩阵形式,每一个样本的所有观测值都在同一个单元格中。在这个单元格中,变量 x 的 10 个值之间用空格分开, x 的最后一个值和 y 的第一个值用逗号隔开,然后变量 y 的 10 个值之间仍旧使用空格间隔。因此,下面几行命令以让 Stata 的了解数据结构,以进行转换。
. insheet using "http://www.execandshare.org/execandshare/htdocs/data/MetaSite/upload/companionSite51/data/data-demo.csv", /// delimiter(",") clear //导入数据,生成 x 和 y ,每一个变量各包括 10 个值。 **注意:对于 Stata 13.0 以上版本运行,还可以使用 import delimited
. split x, parse(`=char(9)') destring . split y, parse(`=char(9)') destring . drop x y . gen t = _n . reshape long x y, i(t) j(id)
首先,我们使用 xtgcause 的默认情况进行操作(即使用滞后一阶,不设定更长的滞后阶数),在这种情况下,检验的结果为接受原假设。结果包括 w(w-bar) , z(z-bar tilde) 。对后两个统计量来说,还提供了就标准正态分布的 P 值。
. xtgcause y x //检验 x 是否导致了 y
Dumitrescu & Hurlin (2012) Granger non-causality test results: -------------------------------------------------------------- Lag order: 1 W-bar = 1.2909 Z-bar = 0.6504 (p-value = 0.5155) Z-bar tilde = 0.2590 (p-value = 0.7956) -------------------------------------------------------------- H0: x does not Granger-cause y. H1: x does Granger-cause y for at least one panelvar (id).
Wald 统计量
也可以使用 Stata 的返回值 r(Wi) 和 r(PVi) 展示 Wald 统计量和相关值(首先将其整合成一个简单矩阵以节省空间):
Dumitrescu & Hurlin (2012) Granger non-causality test results: -------------------------------------------------------------- Lag order: 2 W-bar = 1.7302 Z-bar = -0.4266 (p-value = 0.6696) Z-bar tilde = -0.7052 (p-value = 0.4807) -------------------------------------------------------------- H0: x does not Granger-cause y. H1: x does Granger-cause y for at least one panelvar (id).
基于 Bootstrap 的标准误
我们也可以使用 bootstrapped 计算 P 值和临界值,在这种情况下,bootstrapped 的 P 值和第一次检验中的渐进 P 值相近。
. xtgcause y x, bootstrap lags(1) breps(100) seed(20190802)
Dumitrescu & Hurlin (2012) Granger non-causality test results: -------------------------------------------------------------- Lag order: 1 W-bar = 1.2909 Z-bar = 0.6504 (p-value* = 0.5800, 95% critical value = 2.7526) Z-bar tilde = 0.2590 (p-value* = 0.8400, 95% critical value = 1.9042) -------------------------------------------------------------- H0: x does not Granger-cause y. H1: x does Granger-cause y for at least one panelvar (id). *p-values computed using 100 bootstrap replications.
Berkowitz, J., and L. Kilian. 2000. Recent developments in bootstrapping time series. Econometric Reviews 19: 1- 48.
Breitung, J. 2000. The local power of some unit root tests for panel data. In Advances in Econometrics: Vol. 15 - Nonstationary Panels, Panel Cointegration, and Dynamic Panels, ed. B. H. Baltagi, 161-178. New York: Elsevier.
Dumitrescu, E.-I., and C. Hurlin. 2012. Testing for Granger non-causality in heteroge neous panels. Economic Modelling 29: 1450-1460. -PDF-
Granger, C. W. J. 1969. Investigating causal relations by econometric models and cross-spectral methods. Econometrica 37: 424-438.
Hadri, K. 2000. Testing for stationarity in heterogeneous panel data. Econometrics Journal 3: 148-161. -PDF-
Harris, R. D. F., and E. Tzavalis. 1999. Inference for unit roots in dynamic panels where the time dimension is fixed. Journal of Econometrics 91: 201-226.
Im, K. S., M. H. Pesaran, and Y. Shin. 2003. Testing for unit roots in heterogeneous panels. Journal of Econometrics 115: 53-74.
Levin, A., C.-F. Lin, and C.-S. J. Chu. 2002. Unit root tests in panel data: Asymptotic and finite-sample properties. Journal of Econometrics 108: 1- 24.
Luciano Lopez, Sylvain Weber, 2017, Testing for Granger Causality in Panel Data, Stata Journal, 17(4): 972–984. -PDF-
Paramati, S. R., N. Apergis, and M. Ummalla. 2017. Financing clean energy projects through domestic and foreign capital: The role of political cooperation among the EU, the G20 and OECD countries. Energy Economics 61: 62- 71.
Paramati, S. R., M. Ummalla, and N. Apergis. 2016. The effect of foreign direct invest ment and stock market growth on clean energy use across a panel of emerging market economies. Energy Economics 56: 29- 41.
Pesaran, M. H. 2007. A simple panel unit root test in the presence of cross-section dependence. Journal of Applied Econometrics 22: 265- 312.
Salahuddin, M., K. Alam , and I. Ozturk. 2016. The effects of Internet usage and eco nomic growth on CO2 emissions in OECD countries: A panel investigation. Renewable and Sustainable Energy Reviews 62: 1226-1235.
Stine, R. A. 1987. Estimating properties of autoregressive forecasts. Journal of the American Statistical Association 82: 1072-1078.