GrangerTest function

Granger Causality Test

Granger Causality Test

Performs Granger causality test using a vector autoregressive model

GrangerTest(X,p=1,include.mean=T,locInput=c(1))

Arguments

  • X: a T-by-p data matrix with T denoting sample size and p the number of variables
  • p: vector AR order.
  • include.mean: Indicator for including a constant in the model. Default is TRUE.
  • locInput: Locators for the input variables in the data matrix. Default is the first column being the input variable. Multiple inputs are allowed.

Details

Perform VAR(p) and constrained VAR(p) estimations to test the Granger causality. It uses likelihood ratio and asymptotic chi-square.

Returns

  • data: Original data matrix

  • cnst: logical variable to include a constant in the model

  • order: order of VAR model used

  • coef: Coefficient estimates

  • constraints: Implied constraints of Granger causality

  • aic, bic, hq: values of information criteria

  • residuals: residual vector

  • secoef: standard errors of coefficient estimates

  • Sigma: Residual covariance matrix

  • Phi: Matrix of VAR coefficients

  • Ph0: constant vector

  • omega: Estimates of constrained coefficients

  • covomega: covariance matrix of constrained parameters

  • locInput: Locator vector for input variables

References

Tsay (2014, Chapter 2)

Author(s)

Ruey S. Tsay

  • Maintainer: Ruey S. Tsay
  • License: Artistic License 2.0
  • Last published: 2022-04-11

Useful links