retrofuture
retrofuture

Reputation: 53

Granger Causality with multiple countries in Stata / R

I have read several papers claiming to compare multiple entities (firms, countries, etc.) at the same time using Granger Causality. They usually group countries in east, west, north and south or urban / non urban (for example).

E.g. the public dataset by "Grunfeld" in the plm package has the following form:

| firm | year | inv | value | capital |

I have a similar dataset which I aim to explore using Granger Causality. My time variable is from 1990 to 2020.

country_ID country_type year sum var_A var_B ...
1 1 2000 323 32 213
2 1 2000 13 0 7
3 2 2000 12 7 0
4 1 2000 0 0 0
5 2 2000 323 13 56

Stata does not return anything useful running this through, I suppose it's because of too many countries.

Is it even possible to take a subset of my dataset, say country_type = 1 and run a Granger over the countries included? Or do I have to sum up all countries in country_type in order to run Granger?

One paper I looked into is (p.1310): "The Causality Analysis between Transportation and Regional Development in City-level China" by He et al. (2019).

Upvotes: 0

Views: 436

Answers (1)

Helix123
Helix123

Reputation: 3677

You do not write which of Stata's commands you use. If you have panel data, you may want to use the panel Granger (non-)causality test by Dumitrescu/Hurlin (2012), implemented in Stata's user contributed command xtgcause and in R's plm package as pgrangertest.

Below is an example of how to use pgrangertest with the Grunfeld dataset in R. The help page has references to the literature and some more information on how use more options (?pgrangertest):

## not meaningful, just to demonstrate usage
## H0: 'value' does not Granger cause 'inv' for all invididuals
library(plm)
data("Grunfeld", package = "plm")
pgrangertest(inv ~ value, data = Grunfeld)

# Panel Granger (Non-)Causality Test (Dumitrescu/Hurlin (2012))
#
# data:  inv ~ value
# Ztilde = 3.2896, p-value = 0.001003
# alternative hypothesis: Granger causality for at least one individual

Upvotes: 2

Related Questions