Performs Granger causality test using a vector autoregressive model
GrangerTest(X,p=1,include.mean=T,locInput=c(1))
a T-by-p data matrix with T denoting sample size and p the number of variables
vector AR order.
Indicator for including a constant in the model. Default is TRUE.
Locators for the input variables in the data matrix. Default is the first column being the input variable. Multiple inputs are allowed.
Original data matrix
logical variable to include a constant in the model
order of VAR model used
Coefficient estimates
Implied constraints of Granger causality
values of information criteria
residual vector
standard errors of coefficient estimates
Residual covariance matrix
Matrix of VAR coefficients
constant vector
Estimates of constrained coefficients
covariance matrix of constrained parameters
Locator vector for input variables
Perform VAR(p) and constrained VAR(p) estimations to test the Granger causality. It uses likelihood ratio and asymptotic chi-square.
Tsay (2014, Chapter 2)