MathType

Saturday 13 May 2017

Causality Test: Granger Method with Stata



We have perform the VAR analysis in here  before. After fitting a VAR, we may want to know whether one variable “Granger-causes” another (Granger, 1969).

The variable \(x\)  is said to Granger-cause  a variable \(y\)  if, given the past value of \(y\), past value of  \(x\) are useful for predicting \(x\).

The common method for testing Granger causality is to regress \(y\) on its own lagged values and on lagged values of \(x\) and test the null hypothesis that the estimated coefficients on the lagged values of  \(x\) are jointly zero.

Failure to reject the null hypothesis is equivalent to failing to reject the hypothesis that  \(x\) does not Granger-cause \(y\).

The test involves estimating the following pair of regression:

\({{y}_{t}}=\sum\limits_{i=1}^{m}{{{\alpha }_{i}}{{x}_{t-i}}+\sum\limits_{i=1}^{n}{{{\beta }_{i}}{{y}_{t-i}}+{{u}_{1t}}}}\)               (1)

\({{x}_{t}}=\sum\limits_{i=1}^{p}{{{\gamma }_{i}}{{x}_{t-i}}+\sum\limits_{i=1}^{q}{{{\delta }_{i}}{{y}_{t-i}}+{{u}_{2t}}}}\)                (2)        

                                                               
where its assumed that the disturbance \({{u}_{it}}\) and \({{u}_{2t}}\) are uncorrelated, \(E\left( {{u}_{1t}},{{u}_{2t}} \right)=0\). Since we have two variables, we are dealing with bilateral causality.

Eq (1) postulates that current value of \({{y}_{t}}\)  is related to past value of itself as that of \({{x}_{t}}\) , and Eq(1) postulates similar behavior for \({{x}_{t}}\) .

Note that, these regression can be cast in difference form, \(\Delta {{y}_{t}}\) and \(\Delta {{x}_{t}}\) .

We now can distinguished four cases;

1.      Unidirectional causality from \({{x}_{t}}\to {{y}_{t}}\)   is indicated if the estimated lagged \({{x}_{t}}\) in Eq(1) are statistically different from zero as a group \(\left( \sum{{{\alpha }_{i}}\ne 0} \right)\) and set of estimated coefficients on lagged \({{y}_{t}}\) in Eq(2) is not statistically different from zero, \(\left( \sum{{{\delta }_{i}}=0} \right)\).

2.     Unidirectional causality from \({{y}_{t}}\to {{x}_{t}}\) is indicated if the estimated lagged  in Eq(2) are statistically different from zero as a group \(\left( \sum{{{\delta }_{i}}\ne 0} \right)\) and set of estimated coefficients on lagged \({{x}_{t}}\) in Eq(1) is not statistically different from zero, \(\left( \sum{{{\alpha }_{i}}=0} \right)\).

3.     Feedback or bilateral causality, \({{y}_{t}}\leftrightarrow {{x}_{t}}\)  is suggest when set of \({{x}_{t}}\)  and \({{y}_{t}}\) coefficients are statistically significant different from zero in both regression; \(\left( \sum{{{\alpha }_{i}}\ne 0} \right)\),\(\left( \sum{{{\delta }_{i}}\ne 0} \right)\).

4.   Independence, is suggest when set of \({{x}_{t}}\) and \({{y}_{t}}\) coefficients are not statistically significant in both the regression; \(\left( \sum{{{\alpha }_{i}}=0} \right)\),\(\left( \sum{{{\delta }_{i}}=0} \right)\).



Causality test using Stata


In Stata, for each equations and each endogenous variable as the dependent variable in that equations, vargranger computes and report Wald tests that the coefficients on all lags of an endogenous variable are jointly zero.

For each equation on a VAR, vargranger test the hypothesis that each of the other endogenous variables does not Granger-cause the dependent variable in those equations.

For test the causality, we will use again Data09.

In VAR analysis before, we have concluded that the appropriate lag-length is seven lag. That means, for our analysis non-causality test we will deal only seven lag-length.

To perform the Granger causality test, we need first to run the VAR and then perform the Granger test;

quietly  var lrgrossinv lrconsump lrgdp, lags(1/7) dfk small
vargranger

 
 
Same as in VAR output, equations are distinguished by their dependent variable. For each equation, vargranger test for the Granger causality of each variable individually, then tests for the Granger causality of all added variable jointly.

Lets we consider the Granger causality test for real household consumption expenditure (=lrconsump). The row with “lrgdp Excluded” is refer for test the null hypothesis that all coefficient on lags of the real gross domestic product (=lrgdp) equation are equal to zero, aginst the alternative that at least one is not equal to zero. The -value of 0.14 does not fall below the typical statistical significance threshold of 0.05; hence, we fail to reject the null hypothesis that lags of real gross domestic product do not affect the real household consumption expenditure. With this model and these data, the results show that the real gross domestic product does not Granger-cause to real household consumption expenditure.

By contrast, in the real gross domestic product equation, lags of real household consumption expenditure are statistically significant and we can tell that the real household consumption expenditure is Granger-cause to the real gross domestic product. That means, the Granger causality test between the real household consumption expenditure and real gross domestic product show only one-way direction;  .

The “ALL excluded” row for each equation excludes all lags that are not the autocorrelation coefficient in an equation; it is a joint test for the significance of all lags of all other variables in that equation. It maybe considered a test between a purely autoregressive specification (null) against the VAR specification for that equation (alternate).

Beside using the vargranger command to perform the Granger causality test, we also can replicate the results by running OLS on each equation “manually” and using test with the appropriate null hypothesis;

quietly reg lrconsump L(1/7).lrconsump L(1/7).lrgrossinv L(1/7).lrgdp
test L1.lrgrossinv=L2.lrgrossinv=L3.lrgrossinv=L4.lrgrossinv=L5.lrgrossinv=L6.lrgrossinv=L7.lrgrossinv=0
 
 


test L1.lrgdp=L2.lrgdp=L3.lrgdp=L4.lrgdp=L5.lrgdp=L6.lrgdp=L7.lrgdp=0
 
 


The results of a “manual” Granger causality test match the results from vargranger output.

We can summarize the Granger causality  test between the variables lrconsump, lrgdp and lrgrossinv by mapping it to show the clearly causality direction between them.

 








 

No comments:

Post a Comment