# How to perform Granger causality test in STATA?

A previous article (Lag selection and cointegration test in VAR with two variables) in this module demonstrated the application of the cointegration test in time series analysis. Applying Granger causality test in addition to the cointegration test like *Vector Autoregression (VAR)* helps detect the direction of causality. It also helps to identify which variable acts as a determining factor for another variable. This article shows how to apply the Granger causality test in STATA.

*VAR* model includes past values of other series to the series’ own history. Granger causality in a *VAR* model implies a correlation between the current values of one variable and the past values of other variables. For example, consider two variables X and Y. If lagged values of X and Y can predict X, then Y will Granger-cause X. Conversely, if X influences Y, then X Granger-causes Y. This is called unidirectional causality because one variable Granger-causes another variable. In some cases, both variables X and Y are found to be influenced by the other’s lagged values in addition to its own. This leads to a bidirectional causality.

## Declare time variable using *VAR* in STATA

Before performing the Granger causality test, declare the ‘time’ variable as follows. This article takes into consideration the same three variables as previous articles; **Gross Domestic Product (GDP)**, Private Final Consumption (PFC) and * GFC (Gross Fixed Capital Formation)* of India. The time period is 1997 to 2018.

To perform *VAR* in STATA, follow these steps:

- Go to ‘Statistics’ on the Result window
- Go to ‘Multivariate time series’
- Click on ‘Vector autoregression (VAR)’.

The below figure will appear. Choose the dependent variables in the box, i.e. gdp, gfcf, pfce. Select the number of lags, i.e. 2. Then click on ‘OK’.

Alternatively, use the following STATA command for *VAR*:

VAR pfcegfcfgdp, lags(1/2)

The below results will appear.

Next, perform the Granger causality test to examine the direction of causality between the variables.

**research analysis**ready in 30 days. Use

**5E3BCCB908B47**to get a discount of 6000 on 6001 - 10000 words standard order.

Order now

^{}

## Granger causality test

For executing the Granger causality test in STATA, follow these steps:

- Go to ‘Statistics’.
- Click on ’Multivariate time series’.
- Select ‘VAR diagnostics and tests’.
- Choose ‘Granger causality tests’.

The below figure will appear. Select ‘Use active or svar results’ and click on ‘OK’.

The null hypothesis for the Granger causality test is:

- First equation: Lagged values of gfcf and gdp do not cause pfce.
- Second equation: Lagged values of pfce and gdp do not cause gfcf.
- Third equation: Lagged values of pfce and gfcf do not cause gdp.

## Results

The results of the Granger causality test will appear.

### First row

The first row of the above figure shows that lagged values of gfcf cause pfce as the p-value is equal to 0.05. However, because of the p-value (0.436 > 0.05), lagged values of gdp do not cause pfce. Therefore the null cannot be rejected. The direction of causality is therefore from * GFC *to PFC.

### Second row

In the second row, p-value for pfce is very small (0.0000 < 0.05). Therefore, the null hypothesis stating that “lagged values of pfce do not cause gfcf” can be rejected at a 5% level of significance. However, the null hypothesis that “lagged values of gdp do not cause gfcf” cannot be rejected as the corresponding p-value (0.588) is greater than 0.05. This implies that **GDP** does not Granger-cause ** GFC** and the direction of causality is from

__PFC__to

**.**

*GFC***thesis writing**of 62001 - 70000 words for 240000.00 ready in 250 days as standard order. Use

**5E26B3F82A6CE**for a discount of 20000 .

Order now

^{}

### Third row

The results in the third row show that lagged values of both pfce and gfcf cause gdp. Since p values for both the variables are less than 0.05, reject the null hypothesis ‘lagged values of gfcf and pfce do not cause gdp’ at a 5% level of significance. The direction of causality is from both ** GFC** and

__PFC__to

**GDP**.

Therefore the presence of Granger causality is as follows.

and*GFC*__PFC__– bidirectional Granger causality.__PFC__and– unidirectional Granger causality.*GFC*

These results are in accordance with existing theory, as ** GFC** and

__PFC__are both components of

**GDP**in the national income accounting identity. Therefore lagged values of

__PFC__and

**Granger-cause**

*GFC***GDP**, but

**GDP**does not Granger-cause

__PFC__and

**. The next article shows the testing of the normality of time series data.**

*GFC*
## Discuss