Tsvargranger
Tsvargranger
com
vargranger — Pairwise Granger causality tests after var or svar
Description
vargranger performs a set of Granger causality tests for each equation in a VAR, providing a
convenient alternative to test; see [R] test.
Quick start
Perform a Granger causality test after var or svar
vargranger
Perform a Granger causality test on vector autoregression estimation results stored as myest
vargranger, estimates(myest)
Menu
Statistics > Multivariate time series > VAR diagnostics and tests > Granger causality tests
1
2 vargranger — Pairwise Granger causality tests after var or svar
Syntax
vargranger , estimates(estname) separator(#)
vargranger can be used only after var or svar; see [TS] var and [TS] var svar.
collect is allowed; see [U] 11.1.10 Prefix commands.
Options
estimates(estname) requests that vargranger use the previously obtained set of var or svar
estimates stored as estname. By default, vargranger uses the active results. See [R] estimates
for information on manipulating estimation results.
separator(#) specifies how often separator lines should be drawn between rows. By default, separator
lines appear every K lines, where K is the number of equations in the VAR under analysis. For
example, separator(1) would draw a line between each row, separator(2) between every
other row, and so on. separator(0) specifies that lines not appear in the table.
Because the estimates() option was not specified, vargranger used the active e() results.
Consider the results of the three tests for the first equation. The first is a Wald test that the coefficients
on the two lags of dln inc that appear in the equation for dln inv are jointly zero. The null
hypothesis that dln inc does not Granger-cause dln inv cannot be rejected. Similarly, we cannot
reject the null hypothesis that the coefficients on the two lags of dln consump in the equation for
dln inv are jointly zero, so we cannot reject the hypothesis that dln consump does not Granger-
cause dln inv. The third test is with respect to the null hypothesis that the coefficients on the two
lags of all the other endogenous variables are jointly zero. Because this cannot be rejected, we cannot
reject the null hypothesis that dln inc and dln consump, jointly, do not Granger-cause dln inv.
Because we failed to reject most of these null hypotheses, we might be interested in imposing
some constraints on the coefficients. See [TS] var for more on fitting VAR models with constraints
on the coefficients.
4 vargranger — Pairwise Granger causality tests after var or svar
The first two calls to test show how vargranger obtains its results. The first test reproduces
the first test reported for the dln inv equation. The second test reproduces the ALL entry for the
first equation. The third test reproduces the standard F statistic for the dln inv equation, reported
in the header of the var output in the previous example. The standard F statistic also includes the
lags of the dependent variable, as well as any exogenous variables in the equation. This illustrates
that the test performed by vargranger of the null hypothesis that the coefficients on all the lags of
all the other endogenous variables are jointly zero for a particular equation; that is, the All test is
not the same as the standard F statistic for that equation.
vargranger — Pairwise Granger causality tests after var or svar 5
As we expected, the vargranger results are identical to those in the first example.
Stored results
vargranger stores the following in r():
Matrices
r(gstats) χ2 , df, and p-values (if e(small)=="")
r(gstats) F , df, df r, and p-values (if e(small)!="")
Clive William John Granger (1934–2009) was born in Swansea, Wales, and earned degrees
in mathematics and statistics at the University of Nottingham. Joining the staff there, he also
worked at Princeton on the spectral analysis of economic time series before moving in 1974 to
the University of California, San Diego. He was awarded the 2003 Nobel Prize in Economics
for methods of analyzing economic time series with common trends (cointegration). He was
knighted in 2005, thus becoming Sir Clive Granger.
6 vargranger — Pairwise Granger causality tests after var or svar
References
Amisano, G., and C. Giannini. 1997. Topics in Structural VAR Econometrics. 2nd ed, revised and enlarged. Heidelberg:
Springer.
Baum, C. F., S. Hurn, and J. Otero. 2022. Testing for time-varying Granger causality. Stata Journal 22: 355–378.
Granger, C. W. J. 1969. Investigating causal relations by econometric models and cross-spectral methods. Econometrica
37: 424–438. https://doi.org/10.2307/1912791.
Hamilton, J. D. 1994. Time Series Analysis. Princeton, NJ: Princeton University Press.
Lopez, L., and S. Weber. 2017. Testing for Granger causality in panel data. Stata Journal 17: 972–984.
Lütkepohl, H. 1993. Introduction to Multiple Time Series Analysis. 2nd ed. New York: Springer.
. 2005. New Introduction to Multiple Time Series Analysis. New York: Springer.
Phillips, P. C. B. 1997. The ET Interview: Professor Clive Granger. Econometric Theory 13: 253–303.
https://doi.org/10.1017/S0266466600005740.
Rossi, B., and Y. Wang. 2019. Vector autoregressive-based Granger causality test in the presence of instabilities. Stata
Journal 19: 883–899.
Schenck, D. 2016. Vector autoregressions in Stata. The Stata Blog: Not Elsewhere Classified.
http://blog.stata.com/2016/08/09/vector-autoregressions-in-stata/.
Tastan, H. 2015. Testing for spectral Granger causality. Stata Journal 15: 1157–1166.
Also see
[TS] var — Vector autoregressive models
[TS] var intro — Introduction to vector autoregressive models
[TS] var svar — Structural vector autoregressive models
[TS] varbasic — Fit a simple VAR and graph IRFs or FEVDs
Stata, Stata Press, and Mata are registered trademarks of StataCorp LLC. Stata and
®
Stata Press are registered trademarks with the World Intellectual Property Organization
of the United Nations. Other brand and product names are registered trademarks or
trademarks of their respective companies. Copyright c 1985–2023 StataCorp LLC,
College Station, TX, USA. All rights reserved.