Zhentao Shi
Sep 15, 2021
A VAR(p) system
\[ \mathbf y_t = \boldsymbol{\mu} + \mathbf{\Phi}_1 \mathbf{y}_{t-1} + \cdots + \mathbf{\Phi}_p y_{t-p} + \boldsymbol{\epsilon}_t \]
\(\mathbf{y}_t\) and \(\boldsymbol{\mu}\) are \(K\)-dimensional vectors
\(\boldsymbol{\epsilon}_t \sim \mathbf{iid} (\mathbf{0}, \boldsymbol{\Omega})\), where \(\boldsymbol{\Omega}\) is a \(K\times K\) covariance matrix
\(\mathbf{\Phi}_1, \ldots, \mathbf{\Phi}_p\) are \(K\times K\) parameter matrices
Example: bivariate VAR(1)
\[ \begin{align} y_{1t} & = \mu_1 + \phi_{11} y_{1,t-1} + \phi_{12} y_{2,t-1} + \epsilon_{1t} \\ y_{2t} & = \mu_2 + \phi_{21} y_{1,t-1} + \phi_{22} y_{2,t-1} + \epsilon_{2t} \end{align} \]
cpiUSA
: US Consumer Price IndexcpiCAN
: Canada Consumer Price Index## Intercept cpiUSA -1 cpiCAN -1 cpiUSA -2 cpiCAN -2
## Equation cpiUSA 0.1089088 0.4678089 -0.04648345 -0.028101665 0.07909299
## Equation cpiCAN 0.0987480 0.2705002 -0.02301329 -0.004867705 0.19486643
## cpiUSA -3 cpiCAN -3
## Equation cpiUSA 0.007891732 0.0939838
## Equation cpiCAN 0.010717830 0.1536533
A tool that tracks the dynamics and transmission of a shock in the VAR system
Remind a bivariate system \[ \begin{align} y_{1t} & = \mu_1 + \phi_{11} y_{1,t-1} + \phi_{12} y_{2,t-1} + \epsilon_{1t} \\ y_{2t} & = \mu_2 + \phi_{21} y_{1,t-1} + \phi_{22} y_{2,t-1} + \epsilon_{2t} \end{align} \]
Decompose \(\epsilon_{2t} = \rho \epsilon_{1t} + v_{2t}\), where \(\rho\) is the population regression coefficient
By design, \(\epsilon_{1t}\) is uncorrelated with \(v_{2t}\)
Rewrite the VAR into a structural VAR (SVAR)
\[ \begin{align} y_{1t} & = \mu_1 + \phi_{11} y_{1,t-1} + \phi_{12} y_{2,t-1} + \epsilon_{1t} \\ y_{2t} & = \mu_2 + \phi_{21} y_{1,t-1} + \phi_{22} y_{2,t-1} + (\rho \epsilon_{1t} + v_{2t}) \\ & = \tilde{\mu}_2 + \rho y_{1t} + \tilde{\phi}_{21} y_{1,t-1} + \tilde{\phi}_{22} y_{2,t-1} + v_{2t} \end{align} \]
\[ y_{1t} = \mu_1 + \phi_{11} y_{1,t-1} + \phi_{12} y_{2,t-1} + \epsilon_{1t}. \]
\[ \begin{align} \\ y_{2t} & = \tilde{\mu}_2 +\rho y_{1t} + \tilde{\phi}_{21} y_{1,t-1} + \tilde{\phi}_{22} y_{2,t-1} + v_{2t} \end{align} \]
irf_var = irf(mreg, impulse = "cpiUSA", response = c("cpiUSA", "cpiCAN"), boot = FALSE)
print(irf_var)
##
## Impulse response coefficients
## $cpiUSA
## cpiUSA cpiCAN
## [1,] 0.154994135 0.060646708
## [2,] 0.069688566 0.040530272
## [3,] 0.031158080 0.028981581
## [4,] 0.021399138 0.026299843
## [5,] 0.014563998 0.017653617
## [6,] 0.010441039 0.013341153
## [7,] 0.007891908 0.010156895
## [8,] 0.005755647 0.007318570
## [9,] 0.004270164 0.005491120
## [10,] 0.003176343 0.004072063
## [11,] 0.002344197 0.003000950
irf_var = irf(mreg, impulse = "cpiCAN", response = c("cpiUSA", "cpiCAN"), boot = FALSE)
print(irf_var)
##
## Impulse response coefficients
## $cpiCAN
## cpiUSA cpiCAN
## [1,] 0.000000000 0.227148412
## [2,] -0.010558642 -0.005227431
## [3,] 0.013269409 0.041527784
## [4,] 0.025508725 0.036568544
## [5,] 0.012570420 0.013169955
## [6,] 0.011451505 0.016622132
## [7,] 0.008911022 0.011112575
## [8,] 0.005981957 0.007496385
## [9,] 0.004731050 0.006244477
## [10,] 0.003462496 0.004370711
## [11,] 0.002529312 0.003245789
Let \(E_t[ \cdot]\) be the conditional expectation given all information contained from the start of the time up to the time \(t\).
\[ e_{1,T+1}:= y_{1,T+1} - E_T[y_{1,T+1}]. \]
\[ var[e_{1,T+1}] = var[\epsilon_{1,T+1}] = E_T[\epsilon^2_{1,T+1}] \]
\[ \begin{align} e_{2,T+1} & = & y_{2,T+1} - E_T[y_{2,T+1}] \\ & = & \tilde{\mu}_2 + \rho y_{1,T+1} + \tilde{\phi}_{21} y_{1T} + \tilde{\phi}_{22} y_{2T} + v_{2,T+1} \\ & & - (\tilde{\mu}_2 + \rho E_T[ y_{1,T+1} ] + \tilde{\phi}_{21} y_{2T} + \tilde{\phi}_{22} y_{2T}) \\ & = & \rho ( y_{1,T+1} - E_T[y_{1,T+1}] ) + v_{2,T+1} \\ & = & \rho \epsilon_{1,T+1} + v_{2,T+1} \end{align} \]
Thus \(var[e_{2,T+1}] = \rho^2 E_T[\epsilon_{1,T+1}^2] + E_T[ v_{2,T+1}^2].\)
In the VAR(p) system, does it make statistical significant difference if we completely shut down \(y_2\) from the regression equation for \(y_1\)?
Unrestricted model: y_1 ~ Lags(y_1, 1:p) + Lags(y_2, 1:p) + Lags(y_3, 1:p)... + Lags(y_K, 1:p)
Restricted model: y_1 ~ Lags(y_1, 1:p) + Lags(y_3, 1:p)... + Lags(y_K, 1:p)
The null hypothesis restricts all coefficients associated with \(y_2\) as 0.
Under the null, the Wald statistic asymptotically follows \(\chi^2(p)\).
Caution: Granger causality is not “causal”. Instead, it is merely a statistical predictive relationship.
library(lmtest)
data(ChickEgg)
# based on F-test
grangertest(egg ~ chicken, order = 3, data = ChickEgg)
## Granger causality test
##
## Model 1: egg ~ Lags(egg, 1:3) + Lags(chicken, 1:3)
## Model 2: egg ~ Lags(egg, 1:3)
## Res.Df Df F Pr(>F)
## 1 44
## 2 47 -3 0.5916 0.6238
## Granger causality test
##
## Model 1: chicken ~ Lags(chicken, 1:3) + Lags(egg, 1:3)
## Model 2: chicken ~ Lags(chicken, 1:3)
## Res.Df Df F Pr(>F)
## 1 44
## 2 47 -3 5.405 0.002966 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Based on the Wald test
## Granger causality test
##
## Model 1: egg ~ Lags(egg, 1:3) + Lags(chicken, 1:3)
## Model 2: egg ~ Lags(egg, 1:3)
## Res.Df Df Chisq Pr(>Chisq)
## 1 44
## 2 47 -3 1.7748 0.6204
## Granger causality test
##
## Model 1: chicken ~ Lags(chicken, 1:3) + Lags(egg, 1:3)
## Model 2: chicken ~ Lags(chicken, 1:3)
## Res.Df Df Chisq Pr(>Chisq)
## 1 44
## 2 47 -3 16.215 0.001025 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1