As shown in the documentation, after running a vector autoregression model (VAR), one can continue with the causality command for Granger tests:
causality(x, cause = NULL, vcov.=NULL, boot=FALSE, boot.runs=100)
This is the example in the documentation,
data(Canada) # below is the data structure
> e prod rw U
>1980 Q1 929.6105 405.3665 386.1361 7.53
>1980 Q2 929.8040 404.6398 388.1358 7.70
>1980 Q3 930.3184 403.8149 390.5401 7.47
>1980 Q4 931.4277 404.2158 393.9638 7.27
>1981 Q1 932.6620 405.0467 396.7647 7.37
var.2c <- VAR(Canada, p = 2, type = "const")
causality(var.2c, cause = "e")
which returns
$Granger
Granger causality H0: e do not Granger-cause prod rw U
data: VAR object var.2c
F-Test = 6.2768, df1 = 6, df2 = 292, p-value = 3.206e-06
My question is: what is this Granger test for and how to interpret it?
It says in the results that the null hypothesis is "H0: e do not Granger-cause prod rw U", does that mean it is testing whether e Granger causes prod, rw, U all at the same time with one p-value?
When using grangertest()
in R
, one always needs to specify both a cause and the dependent variable, so it is not entirely intuitive for me how causality()
works.