In this article, we review Granger causality tests that are robust to the presence of instabilities in a vector autoregressive framework. We also introduce the gcrobustvar command, which illustrates the procedure in Stata. In the presence of instabilities, the Granger causality robust test is more powerful than the traditional Granger causality test.
Vector autoregressive (VAR) models have played an important role in macroeconomic analysis since Sims (1980). A VAR is a multiequation, multivariable linear model where each variable is in turn explained by its own lagged values as well as current and past values of the remaining variables. Compared with a univariate autoregression, VARs provide both a systematic way to capture the rich dynamics in multiple time series and a coherent, credible approach to forecasting.
Granger (1969) causality is a useful tool for characterizing the dependence among time series in reduced-form VARs, and Granger causality test statistics are widely used to examine whether lagged values of one variable help to predict another variable—see Stock and Watson (2001).
Thus, given the widespread use of VARs and the evidence of instabilities, it is potentially important to allow for changes over time when doing VAR-based statistical inference. As demonstrated in Rossi (2005), because the traditional Granger causality test assumes stationarity, it is not reliable in the presence of instabilities and may lead to incorrect inference.
In this article, we present the gcrobustvar command, which illustrates how to test Granger causality in a way that is robust to the presence of instabilities. The test is based on methodologies developed by Rossi (2005) and includes the robust versions of the mean and exponential Wald tests (Andrews and Ploberger 1994), the Nyblom (1989) test, and the Quandt (1960) and Andrews (1993) quasilikelihood-ratio tests. In the presence of instabilities, the Granger causality robust tests are more powerful than the traditional Granger causality test. The tests can also be used to find the point in time in which Granger causality either appears or breaks down in the data. In addition, the test is valid for reduced-form VAR models and VAR-based direct multistep (VAR– LP) forecasting models. The former assume homoskedastic idiosyncratic shocks, while the latter are estimated via local projections (LP) (see Jord`a [2005]) and hence assume heteroskedastic and serially correlated idiosyncratic shocks.
We first introduce the tests and then present the commands that implement them. Then, we illustrate the empirical implementation of the robust Granger causality tests using a three-variable (inflation, unemployment, and interest rate) VAR model with four lags as in Stock and Watson (2001), as well as a direct multistep VAR–LP forecasting model. Finally, we compare the results with those based on a traditional Granger causality test.
The remainder of this article is organized as follows. Section 2 describes the theoretical framework and the Granger causality robust tests. Section 3 introduces the gcrobustvar command, which implements the Granger causality robust tests in Stata. Section 4 applies the Granger causality robust tests in the three-variable VAR and compares the results with the traditional Granger causality test. Section 5 applies the Granger causality robust tests in the direct multistep VAR–LP forecasting model.
2 VAR-based Granger causality test in the presence of instabilities
2.1 Motivation
In the presence of instabilities, as shown in Rossi (2005), traditional Granger causality tests may have no power. Consider one of the equations in a two-variable VAR with one lag and fixed prediction horizon h, for example: For simplicity, we assume that and are independent of each other. Suppose the parameter changes through time as follows:
In this example, a traditional Granger causality test would be a t test applied on the full-sample ordinary least-squares (OLS) parameter estimator , which, asymptotically, can be calculated as (because the regressors are independent)
because
Equation (2) implies that we do not reject the null hypothesis even if xt−1 does Granger-cause yt+h in reality. This failure to reject results from the violation of the stationarity assumption underlying traditional Granger causality tests because the predictive ability is unstable across time. Thus, traditional Granger causality tests can be inconsistent if there are instabilities in the parameters. Without losing generality, this conclusion can be generalized to instabilities other than (1) by varying the time and the magnitude of the break. Note that this conclusion is empirically relevant because evidence shows that parameter estimates change substantially in sign and magnitude across time; see, for example, Welch and Goyal (2008) and Rossi (2005).
Considering the possibility of parameter instabilities, Rossi (2005) proposes tests to evaluate the predictive ability in the situation where the parameter might be time varying by testing jointly the significance of the predictors and their stability over time. More generally, let βt change at some unknown point in time, Let and denote the OLS estimators before and after the break.2 With respect to the null hypothesis of no Granger causality at any point in time, that is, the robust test builds on two components: and . A test on whether the first component (the full-sample estimate of the parameter)3 is zero detects situations in which the parameter is constant and different from zero. A test on whether the second component (the difference between the parameters estimated in the two subsamples) is zero detects situations in which the parameter changes, which detects situations in which the regressor Granger-causes the dependent variable in such a way that the parameter changes but the average estimate equals zero, as in (1). Rossi (2005) proposes several test statistics, including The corresponding critical values of the asymptotic distributions under the null are tabulated in Rossi’s (2005) table B1.
Note that a test for structural breaks would not necessarily be the correct approach either. In fact, while in the previous example the researcher would identify a break, a structural break test is not sufficient or necessary for the existence of Granger causality. In fact, imagine that a variable has predictive content for another variable and the predictive ability is constant over time; that is, A structural break test is not necessary or sufficient to detect predictive ability. The approach taken in this article is to jointly test which also avoids issues of multiple testing that one would incur when separately testing instability and Granger causality.
Note also that the way the possible presence of instabilities is modeled here is via a one-time break; such an approach has been proven to be more powerful than cumulative sum (CUSUM) tests—see Andrews, Lee, and Ploberger (1996), who derived the optimal tests (the exponential averages of the Wald test statistics) for one or more change points at unknown times in a multiple linear regression model. They compare the power of the optimal exponential tests with that of other tests in the literature such as the likelihood-ratio or supF test; the CUSUM test in Brown, Durbin, and Evans (1975); and the midpoint F test considering a one-time break in parameter. They find that the optimal tests perform quite well in finite samples compared with the other tests considered while the CUSUM test performs poorly.
2.2 Framework
We consider two types of VAR specifications. The first is a reduced-form VAR with time-varying parameters,
where is an (n × 1) vector and Aj,t, j = 1,…, p, are (n × n) time-varying coefficient matrices.
The second is a direct multistep VAR–LP forecasting model with time-varying parameters. By iterating (3), can be projected onto the linear space generated by specifically,
where are functions of Aj,t, j = 1,…, p in (3) and ǫt+h is a moving average of the errors u from time t to t + h in (3) and therefore uncorrelated with the regressors but serially correlated itself.5 Note that h = 0 is a special case where (4) degenerates to (3). Thus, we focus on (4) from now on.
Let be an appropriate subset of vecThe null hypothesis of the Granger causality robust test is
The statistics to test H0 in (5), following Rossi (2005), are ExpW* (the exponential Wald test), MeanW* (the mean Wald test), Nyblom* (the Nyblom test), and QLR* (the Quandt likelihood-ratio [QLR] test).6
The optimal ExpW* and the optimal MeanW* tests are based on the exponential test statistics proposed in Andrews and Ploberger (1994). The optimal MeanW* is designed for alternatives that are close to the null hypothesis, while the optimal ExpW* is designed for testing against more distant alternatives. The optimal Nyblom* is based on the Nyblom (1989) test, which is the locally most powerful invariant test for the constancy of the parameter process against the alternative that the parameters follow a random walk process. The optimal QLR* is based on Andrews’s (1993) Sup-LR test (or the QLR test), which considers the supremum of the statistics over all possible break dates of the Chow statistic designed for a fixed break date.
2.3 A special case: The traditional Granger causality test
The traditional Granger causality test is a special case where the parameters in (4) are time invariant; that is, for j = 1,…, p, we replace with Thus, (4) becomes
To consider a more concrete example, Stock and Watson (2001) study a threevariable VAR with four lags (p = 4) and h = 0. The variables included are inflation (πt), unemployment (ut), and interest rate (Rt). Their reduced-form VAR is
Thus, in Stock and Watson (2001), the reduced-form VAR involves three equations: current unemployment as a function of past values of unemployment, inflation, and the interest rate; current inflation as a function of past values of inflation, unemployment, and the interest rate; and current interest rate as a function of past values of inflation, unemployment, and the interest rate. Stock and Watson (2001) consider traditional Granger causality tests in each equation where the null hypothesis is where θ is the appropriate subset of vecFor example, unemployment does not Granger-cause inflation if
If unemployment does not Granger-cause inflation, then lagged values of unemployment are not useful for predicting inflation.
3 The gcrobustvar command
3.1 Syntax
The gcrobustvar command implements the VAR-based Granger causality robust test. The general syntax of the gcrobustvar command is
depvarlist is a list of dependent variables, that is, all the variables in yt in the notation in (6).
3.2 Options
pos(#,#) is a numeric list (that is, numlist in Stata) including two integers indicating the positions of the targeted dependent variable and restricted regressor, respectively. For example, if we are testing whether the second variable, y2,t, Granger-causes the first variable, y1,t, in the presence of instabilities, then we assign the numeric list as pos(1,2), where the integer 1 refers to the position of the targeted dependent variable in the VAR (that is, y1,t in this example) and the integer 2 refers to the position of the targeted restricted regressor in the VAR (that is, y2,t in this example). pos() is required.
nocons suppresses the constant term. The default regression includes the constant term.
horizon(#) specifies the targeted horizon, that is, h in the notation in (4). The default refers to a reduced-form VAR assuming homoskedastic idiosyncratic shocks. When horizon(h) (h ≥ 0) is specified, the command assumes heteroskedastic and serially correlated idiosyncratic shocks and chooses the truncation lag used in the estimation of the long run variance. The truncation lag is automatically determined using Newey and West (1994) optimal lag-selection algorithm. Note that horizon(0) refers to a reduced-form VAR assuming heteroskedastic and serially correlated idiosyncratic shocks, and horizon(h) (h > 0) refers to the (h + 1)-step-ahead forecasting model; see (4). For example, in a one-year-ahead VAR–LP forecasting model with quarterly data, horizon(3) should be specified.
lags(numlist) specifies the lags included in the VAR. The default is lags(1 2). This option takes a numlist and not simply an integer for the maximum lag. For example, lags(2) would include only the second lag in the model, whereas lags(1 2) would include both the first and second lags in the model. The shorthand to indicate the range follows numlist in Stata.
trimming(level) is the trimming parameter. As is standard in the structural break literature, the possible break dates are usually trimmed to exclude the beginning and end of the sample period. If we specify trimming(µ), the range where we search for instabilities is set to be [µT, (1 − µ)T ], where T is the number of total periods. The default is trimming(0.15), which is recommended in the structural break literature and commonly used in practice.
3.3 Stored results
gcrobustvar stores the following in r():
3.4 Empirical example of practical implementation in Stata
In what follows, we illustrate how to use the gcrobustvar command to implement the robust Granger causality test in Stata. The data (GCdata.xlsx, provided with the article files) include quarterly U.S. data on the rate of price inflation the unemployment rate (ut), and the interest rate (Rt, specifically, the federal funds rate) from 1959:I–2000:IV. These are the same variables used in Stock and Watson (2001). Inflation is computed as where Pt is the chain-weighted gross domestic product price index. Quarterly data on ut and Rt are quarterly averages of their monthly values.
Consider the inflation equation in (3):
Suppose we are interested in testing whether unemployment (u) Granger-causes inflation (π), and we want the test to be robust to instabilities over time. That is, we want to test whether the coefficients of lagged values of unemployment (u) are zero across time:
Implementing the Granger causality tests in the presence of instabilities
The following scripts implement the Granger causality robust test. We first import the data, claim the data to be time series, and import the p-value tables needed for the tests:
Then, we run the Granger causality robust test using the gcrobustvar command. When we run the gcrobustvar command, important information (variables, lags, etc.) will be displayed:
The results are displayed in the following script. The gcrobustvar command provides the four optimal test statistics (ExpW*, MeanW*, Nyblom*, QLR*) and their corresponding p-values:
Here is how we get all the inputs of the gcrobustvar command. depvarlist lists the variables included in the VAR, that is, π, u, and R in this order. Because we are testing whether lags of the second variable, ut, Granger-cause the first variable, πt, in the presence of instabilities, we assign the positions pos(1,2). As for the options, we include the constant term and include four lags, that is, lags(1/4), as in Stock and Watson (2001). In addition, we assume homoskedasticity and choose the standard trimming parameter 0.15.
Here is how to interpret the results. Let’s take the ExpW* statistics as an example. The value of ExpW* is 9.20, and the p-value is 0.07. Thus, the test rejects the null hypothesis that unemployment (u) does not Granger-cause inflation (π) for all t at the 10% significance level.
4 Comparison with the traditional Granger causality test
In this section, we compare the robust Granger causality tests with the traditional Granger causality test in the three-variable VAR model in Stock and Watson (2001). The VAR includes a constant term and four lags and assumes homoskedastic idiosyncratic shocks.
Table 1 reports the p-values of the traditional Granger causality Wald statistics. The results show that π Granger-causes R, u Granger-causes both π and R, and R Granger-causes u at the 5% significance level.
Table 2 reports the p-values of the robust Granger causality test statistics (for ExpW*, MeanW*, Nyblom*, and QLR*, respectively). We are testing whether the restricted regressor Granger-causes the dependent variable in the presence of instabilities. For example, if we consider the dependent variable π and the restricted regressor R, we are testing whether R Granger-causes π in a way robust to instabilities across time, that is, whether the coefficients of lags of R are constant and equal to zero over time. The p-value of the ExpW* statistics in panel A in table 2 is 0.01, so the test does reject the null at the 5% significance level. Hence, R does Granger-cause π.
Comparing tables 1 and 2, we find the empirical conclusions differ if a researcher uses the Granger causality robust test instead of the traditional Granger causality test. In fact, R does not Granger-cause π at the 5% significance level in the traditional Granger causality test, but R does Granger-cause π at the 5% significance level in the Granger causality robust test according to the ExpW*, Nyblom*, and SupLR* test statistics. Hence, there is empirical evidence that lagged values of R can predict π, but the predictive ability shows up only sporadically over time, which is the reason why the traditional Granger causality test does not detect it.
Traditional reduced-form VAR-based Granger causality tests
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.25
0.00
u
0.01
0.00
0.00
R
0.22
0.00
0.00
NOTE: This table reports p-values of the Wald statistics of the traditional Granger causality test. h = 0 (that is, the reduced-form VAR model), lags = (1, 2, 3, 4), assuming homoskedastic idiosyncratic shocks.
Robust Granger causality tests in the reduced-form VAR
Panel A—ExpW*
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.20
0.00
u
0.07
0.00
0.00
R
0.01
0.00
0.00
Panel B—MeanW*
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.44
0.00
u
0.06
0.00
0.00
R
0.20
0.01
0.00
Panel C—Nyblom*
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.22
0.00
u
0.08
0.00
0.00
R
0.03
0.02
0.00
Panel D—QLR*
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.08
0.00
u
0.07
0.00
0.00
R
0.00
0.00
0.00
NOTE: This table reports p-values of the statistics of the Granger causality robust test. h = 0 (that is, the reduced-form VAR model), lags = (1, 2, 3, 4), the trimming parameter µ = 0.15, assuming homoskedastic idiosyncratic shocks.
gcrobustvar also returns a graph showing the whole sequence of the Wald statistics across time, which gives more information on when the Granger causality occurs. In fact, the optimal QLR* is the supremum of the sequence of Wald statistics testing whether the parameters are zero at each point in time against the alternative that the parameters change at a given break date at time tq. Figure 1 plots the sequence of the Wald statistics over the possible break dates, reported on the x axis. Consider as an example the test of whether unemployment (u) Granger-causes inflation (π); figure 1 documents the whole sequence of the Wald statistics testing whether unemployment (u) Granger-causes inflation (π). The sequence of the Wald statistic (depicted by a continuous line in figure 1) is above the 10% critical value line (depicted by the dashed lines) around 1970q1 and 1980q1. The figure is saved as gcrobustvar_pi_u.
Wald statistics testing whether unemployment (u) Granger-causes inflation (π) against the alternative of a break in Granger causality at time tq (reported on the x axis)
5 Robust Granger causality tests in LP
Section 4 considers the reduced-form VAR assuming homoskedastic idiosyncratic shocks. In this section, we extend the VAR analysis to Jord`a’s (2005) LP by implementing the direct multistep VAR–LP forecasting model in (6) and assuming heteroskedastic and serially correlated idiosyncratic errors. Allowing for heteroskedasticity and serial corre-lation is important when the researcher extends the VAR analysis to LP, where the error terms in (6) can be both heteroskedastic and serially correlated.
We consider the one-year-ahead VAR–LP forecasting model with a constant term and four lags. The setting is similar to section 4 except that we specify h = 3 and relax the homoskedasticity assumption.
The following is the command to implement the robust Granger causality test to investigate whether the coefficients on Rt−1, Rt−2, Rt−3, Rt−4 are zero across time in the one-year-ahead VAR–LP forecasting model in the equation where the dependent variable is To test other coefficients, we implement the command similarly, except for adjusting the input of pos(#,#).
Table 3 reports the p-values of the robust Granger causality test statistics (the ExpW*, MeanW*, Nyblom* and QLR* statistics, respectively). The results show that lags of inflation (π) can significantly forecast the one-year-ahead unemployment (u) and interest rate (R), lags of unemployment can significantly forecast the one-yearahead inflation and interest rate, and lags of interest rate can significantly forecast the one-year-ahead inflation and unemployment.
Robust Granger causality tests in the direct multistep VAR-LP forecasting model
Panel B—MeanW*
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.00
0.00
u
0.00
0.00
0.00
R
0.00
0.00
0.00
Panel C—Nyblom*
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.00
0.00
u
0.00
0.00
0.00
R
0.00
0.00
0.00
Panel D—QLR*
Restricted regressors
Dependent variable
π
u
R
π
0.00
0.00
0.00
u
0.00
0.00
0.00
R
0.00
0.00
0.00
NOTE: This table reports p-values of the statistics of the Granger causality robust test. h = 3 (that is, the one-year-ahead VAR–LP forecasting model), lags = (1, 2, 3, 4), the trimming parameter µ = 0.15, assuming heteroskedastic and serially correlated idiosyncratic shocks.
7 Programs and supplemental materials
Supplemental Material, st0581 - Vector autoregressive-based Granger causality test in the presence of instabilities
Supplemental Material, st0581 for Vector autoregressive-based Granger causality test in the presence of instabilities by Barbara Rossi and Yiru Wang in The Stata Journal
Footnotes
6 Acknowledgment
The project received funding from the European Research Council (ERC). The Barcelona Graduate School of Economics acknowledges financial support from the Spanish Ministry of Economy and Competitiveness through the Severo Ochoa Programme for Centres of Excellence in R&D (SEV-2015-0563).
7 Programs and supplemental materials
To install a snapshot of the corresponding software files as they existed at the time of publication of this article, type
. net sj 19-4
. net install st0581 (to install program files, if available)
. net get st0581 (to install ancillary files, if available)
Notes
References
1.
AndrewsD. W. K.1993. Tests for parameter instability and structural change with unknown change point. Econometrica61: 821–856.
2.
AndrewsD. W. K.LeeI.PlobergerW.1996. Optimal changepoint tests for normal linear regression. Journal of Econometrics70: 9–38.
3.
AndrewsD. W. K.PlobergerW.1994. Optimal tests when a nuisance parameter is present only under the alternative. Econometrica62: 1383–1414.
4.
BoivinJ.GiannoniM. P.2006. Has monetary policy become more effective?Review of Economics and Statistics88: 445–462.
5.
BrownR. L.DurbinJ.EvansJ. M.1975. Techniques for testing the constancy of regression relationships over time. Journal of the Royal Statistical Society, Series B37: 149–192.
6.
ClarkT. E.McCrackenM. W.2006. The predictive content of the output gap for inflation: Resolving in-sample and out-of-sample evidence. Journal of Money, Credit and Banking38: 1127–1148.
7.
CogleyT.SargentT. J.2001. Evolving post-World War II U.S. inflation dynamics. NBER Macroeconomics Annual16: 331–373.
8.
CogleyT.2005. Drifts and volatilities: Monetary policies and outcomes in the post WWII U.S. Review of Economic Dynamics8: 262–302.
9.
GrangerC. W. J.1969. Investigating causal relations by econometric models and cross-spectral methods. Econometrica37: 424–438.
10.
JordáÓ.2005. Estimation and inference of impulse responses by local projections. American Economic Review95: 161–182.
11.
KozickiS.TinsleyP. A.2001. Shifting endpoints in the term structure of interest rates. Journal of Monetary Economics47: 613–652.
12.
NeweyW. K.WestK. D.1994. Automatic lag selection in covariance matrix estimation. Review of Economic Studies61: 631–653.
13.
NyblomJ.1989. Testing for the constancy of parameters over time. Journal of the American Statistical Association84: 223–230.
14.
QuandtR. E.1960. Tests of the hypothesis that a linear regression system obeys two separate regimes. Journal of the American Statistical Association55: 324–330.
15.
RossiB.2005. Optimal tests for nested model selection with underlying parameter instability. Econometric Theory21: 962–990.
16.
RossiB.2013. Advances in forecasting under instability. In Handbook of Economic Forecasting, vol. 2B, ed. ElliottG.TimmermannA., 1203–1324. Amsterdam: Elsevier.
17.
SimsC. A.1980. Macroeconomics and reality. Econometrica48: 1–48.
18.
StockJ. H.WatsonM. W.1996. Evidence on structural instability in macroeconomic time series relations. Journal of Business & Economic Statistics14: 11–30.
19.
StockJ. H.1999. Forecasting inflation. Journal of Monetary Economics44: 293–335.
20.
StockJ. H.2001. Vector autoregressions. Journal of Economic Perspectives15: 101–115.
21.
StockJ. H.2003. Forecasting output and inflation: The role of asset prices. Journal of Economic Literature41: 788–829.
22.
StockJ. H.2006. Forecasting with many predictors. In Handbook of Economic Forecasting, vol. 1, ed. ElliottG.GrangerC. W. J.TimmermannA., 515–554. Amsterdam: Elsevier.
23.
WelchI.GoyalA.2008. A comprehensive look at the empirical performance of equity premium prediction. Review of Financial Studies21: 1455–1508.
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.