causality {vars} | R Documentation |
Computes the test statistics for Granger- and Instantaneous causality for a VAR(p).
causality(x, cause = NULL)
x |
Object of class ‘varest ’; generated by
VAR() . |
cause |
A character vector of the cause variable(s). If not set,
then the variable in the first column of x$y is used as cause
variable and a warning is printed. |
Two causality tests are implemented. The first is a F-type
Granger-causality test and the second is a Wald-type test that is
characterized by testing for nonzero correlation between the error
processes of the cause and effect variables. For both tests the vector
of endogenous variables y_t is split into two subvectors
y_{1t} and y_{2t} with dimensions (K_1
times 1) and (K_2 times 1) with K = K_1 + K_2.
For the rewritten VAR(p):
[y_{1t} , y_{2t}] = sum_{i=1}^p [α_{11, i}' , α_{12, i}' | α_{21, i}' , α_{22, i}'][y_{1,t-i}, y_{2, t-i}] + CD_t + [u_{1t}, u_{2t}] quad ,
the null hypothesis that the subvector y_{1t} does not
Granger-cause y_{2t}, is defined as
α_{21, i} = 0 for i = 1, 2, ..., p. The
alternative is: exists ; α_{21,i} ne 0 for i =
1, 2, ..., p. The test statistic is distributed as F(p K_1
K_2, KT - n^*), with n^* equal to the total number of
parameters in the above VAR(p) (including deterministic
regressors).
The null hypothesis for instantaneous causality is defined as:
H_0: C σ = 0, where C is a (N times K(K
+ 1)/2) matrix of rank N selecting the relevant co-variances of
u_{1t} and u_{2t}; σ =
vech(Σ_u). The Wald statistic is defined as:
λ_W = T tilde{σ}'C'[2 C D_{K}^{+}(tilde{Σ}_u otimes tilde{Σ}_u) D_{K}^{+'} C']^{-1} C tilde{σ} quad ,
hereby assigning the Moore-Penrose inverse of the duplication matrix D_K with D_{K}^{+} and tilde{Σ}_u = frac{1}{T}sum_{t=1}^T hat{u}_t hat{u}_t'. The duplication matrix D_K has dimension (K^2 times frac{1}{2}K(K + 1)) and is defined such that for any symmetric (K times K) matrix A, vec(A) = D_K vech(A) holds. The test statistic λ_W is asymptotically distributed as chi^2(N).
A list with elements of class ‘htest
’:
Granger |
The result of the Granger-causality test. |
Instant |
The result of the instantaneous causality test. |
The Moore-Penrose inverse matrix is computed with the function
ginv
contained in the package ‘MASS
’.
The Granger-causality test is problematic if some of the
variables are nonstationary. In that case the usual asymptotic
distribution of the test statistic may not be valid under the null
hypothesis.
Bernhard Pfaff
Granger, C. W. J. (1969), Investigating causal relations by econometric models and cross-spectral methods, Econometrica, 37: 424-438.
Hamilton, J. (1994), Time Series Analysis, Princeton University Press, Princeton.
Lütkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York.
Venables, W. N. and B. D. Ripley (2002), Modern Applied Statistics with S, 4th edition, Springer, New York.
data(Canada) var.2c <- VAR(Canada, p = 2, type = "const") causality(var.2c, cause = "e")