Chapter 3 Inference
Consider the following SVAR model: \[y_t = \Phi_1 y_{t-1} + \dots + \Phi_p y_{t-p} + \varepsilon_t\] Assume the stable causal solution, with i.i.d. innovations of mean zero and positive-definite covariance. Treat the identifying map as locally smooth and uniquely normalized; weak or set identification needs additional inference methods. This vector rewrites \(\varepsilon_t=B\eta_t\) where \(\mathbb{V}ar(\eta_t)=I\), which implies \(\Omega_\varepsilon=BB'\).
The corresponding infinite MA representation (Eq. (1.4), or Wold representation, is: \[ y_t = \sum_{h=0}^\infty\Psi_h \eta_{t-h}, \] where \(\Psi_0=B\) and for \(h=1,2,\dots\): \[ \Psi_h = \sum_{j=1}^h\Phi_j\Psi_{h-j}, \] with \(\Phi_j=0\) for \(j>p\) (see Prop. 1.1 for this recursive computation of the \(\Psi_j\)’s).
Inference on the VAR coefficients \(\{\Phi_j\}_{j=1,...,p}\) is straightforward (standard OLS inference). But inference is more complicated regarding IRFs. Indeed, as shown by the previous equation, the (infinite) MA coefficients \(\{\Psi_j\}_{j=1,...}\) are non-linear functions of the dynamics and of the identified impact matrix \(B\). The covariance \(\Omega_\varepsilon\) alone does not identify them. Another issue concerns to small-sample bias: typically, for persistent processes, auto-regressive parameters are known to be downward biased.
The main inference methods are the following:
- Monte Carlo method (Hamilton (1994)) (Section 3.1);
- Asymptotic normal approximation (Lütkepohl (1990)), or Delta method (Section 3.2);
- Bootstrap method (Kilian (1998)) (Sections 3.3 and 3.4).
3.1 Monte Carlo method
We use Monte Carlo when we need to approximate the distribution of a variable whose distribution is unknown (here: the \(\Psi_j\)’s) but which is a function of another variable whose distribution is known (here, the \(\Phi_j\)’s).
For instance, suppose we know the distribution of a random variable \(X\), which takes values in \(\mathbb{R}\), with density function \(p\). Assume \(\mathbb E|\varphi(X)|<\infty\) and that we want its mean. We have: \[ \mathbb{E}(\varphi(X))=\int_{-\infty}^{+\infty}\varphi(x)p(x)dx \] Suppose that the above integral does not have a simple expression. We cannot compute \(\mathbb{E}(\varphi(X))\) but, by virtue of the law of large numbers, we can approximate it as follows: \[ \mathbb{E}(\varphi(X))\approx\frac{1}{N}\sum_{i=1}^N\varphi(X^{(i)}), \] where \(\{X^{(i)}\}_{i=1,...,N}\) are \(N\) independent draws of \(X\). More generally, the distribution of \(\varphi(X)\) can be approximated by the empirical distribution of the \(\varphi(X^{(i)})\)’s. Typically, if 10’000 values of \(\varphi(X^{(i)})\) are drawn, the \(5^{th}\) percentile of the distribution of \(\varphi(X)\) can be approximated by the \(500^{th}\) value of the 10’000 draws of \(\varphi(X^{(i)})\) (after arranging these values in ascending order).
For IRF inference, collect the fitted autoregressive coefficients and covariance entries into \(X\). The identified response vector is the nonlinear transformation \(\varphi(X)\). Proposition 1.4 gives the Gaussian joint sampling limit used for this approximation.
To summarize, here are the steps one can implement to derive confidence intervals for the IRFs using the Monte-Carlo approach: For each iteration \(k\),
- Draw from a plug-in approximation centered at the fitted coefficients, with covariance equal to the estimated limiting covariance divided by the usable sample size. Proposition 1.4 supplies the Gaussian case. Non-Gaussian innovations require an appropriate joint covariance.
- A normal draw of covariance entries need not be positive definite. Use a suitable parameterization or reject inadmissible covariance draws and recognize the finite-sample effect of that truncation. Compute \(B^{(k)}\) so that \(\widehat{\Omega}^{(k)}=B^{(k)}B^{(k)'}\), according to your identification strategy.
- Compute the associated IRFs \(\{\widehat{\Psi}_j\}^{(k)}\).
Keep the fitted IRF as the point estimate and use simulated quantiles for approximate pointwise intervals. Componentwise medians are optional summaries and need not form an IRF path satisfying one common structural model.
The following code implements the Monte Carlo method.
Code
library(IdSS);library(vars);library(Matrix)
data("USmonthly")
First.date <- "1965-01-01"
Last.date <- "1995-06-01"
indic.first <- which(USmonthly$DATES==First.date)
indic.last <- which(USmonthly$DATES==Last.date)
USmonthly <- USmonthly[indic.first:indic.last,]
considered.variables<-c("LIP","UNEMP","LCPI","LPCOM","FFR","NBR","TTR","M1")
y <- as.matrix(USmonthly[considered.variables])
# ===================================
# CEE with Monte Carlo
# ===================================
res.svar.ordering <-
svar.ordering(y,p=3,
posit.of.shock = 5,
nb.periods.IRF = 20,
inference = 3,# 0 -> no inference, 1 -> parametric bootst.,
# 2 <- non-parametric bootstrap, 3 <- Monte Carlo,
# 4 <- bootstrap-after-bootstrap
nb.draws = 200,
confidence.interval = 0.90, # expressed in pp.
indic.plot = 1 # Plots are displayed if = 1.
)
Figure 3.1: IRF associated with a monetary policy shock; Monte Carlo method.
Code
Below we plot the estimated IRFs to a monetary policy shock, together with a sample of 50 IRFs simulated with the Monte Carlo method, and the median of all simulated IRFs.
Code
Figure 3.2: Estimated IRF associated with a monetary policy shock (black line) with simulated IRFs (red lines) and median IRF (blue line); Monte Carlo method.
3.2 Delta method
Suppose \(\beta\) is a vector of parameters and \(\hat\beta\) is an estimator such that \[ \sqrt{T}\,(\hat\beta-\beta)\overset{d}{\longrightarrow}\mathcal{N}(0,\Sigma_\beta), \] where \(\overset{d}{\longrightarrow}\) denotes convergence in distribution, \(\mathcal{N}(0,\Sigma_\beta)\) denotes a multivariate normal distribution with mean vector \(0\) and covariance matrix \(\Sigma_\beta\), and \(T\) is the sample size.
Let \(\varphi\) be continuously differentiable at the true \(\beta\), with Jacobian \(G=\partial\varphi/\partial\beta'\). Then \[ \sqrt T\{\varphi(\hat\beta)-\varphi(\beta)\} \overset d\longrightarrow\mathcal N(0,G\Sigma_\beta G'). \] The limit may be degenerate: nonzero derivatives are needed for a nondegenerate first-order approximation, not for the validity of the displayed statement. Highly nonlinear maps, near-unit roots and weak identification can make finite-sample normal intervals unreliable. The covariance of \(\varphi(\hat\beta)\) is approximately \(G\Sigma_\beta G'/T\); do not divide a covariance already scaled by \(T\) a second time.
Using this property, Lütkepohl (1990) provides the asymptotic distributions of the \(\Psi_j\)’s.
Both approaches use asymptotic sampling approximations. A Gaussian limit for an estimator does not require Gaussian shocks in every model. A correctly designed bootstrap may improve finite-sample approximations, but it is not automatically robust to heavy tails, heteroskedasticity, serial dependence, unit roots or weak identification.
3.3 Bootstrap
A nominal 90% confidence procedure covers the fixed true response at a specified horizon in approximately 90% of repeated samples under the maintained model. The true IRF does not vary across those samples. Pointwise intervals are not simultaneous 90% bands for an entire response path. A bootstrap approximates sampling uncertainty by generating artificial samples from the fitted model.
Bootstrapping consists in:
- re-sampling \(N\) times, i.e., constructing \(N\) samples of \(T\) observations, using the estimated VAR coefficients and
- a sample of residuals from the distribution \(\mathcal{N}(0,BB')\) (parametric approach), or
- a sample of residuals drawn randomly from the set of the actual estimated residuals \(\{\hat\varepsilon_t\}_{t=1,..,T}\). (non-parametric approach).
- re-estimating the SVAR \(N\) times.
Here is the algorithm for the non-parametric approach:
- Construct a sample \[ y_t^{(k)}=\widehat{\Phi}_1 y_{t-1}^{(k)} + \dots + \widehat{\Phi}_p y_{t-p}^{(k)} + \hat\varepsilon_t^{(k)}, \] with \(\hat\varepsilon_{t}^{(k)}=\hat\varepsilon_{s_t^{(k)}}\), where the indices are sampled independently with replacement. Resample entire centered residual vectors to preserve contemporaneous dependence, and specify presample observations or a justified burn-in. Ordinary residual resampling requires serially independent innovations; heteroskedastic or dependent alternatives need a suitable bootstrap design. (Note: in the parametric approach, we would draw \(\hat\varepsilon_{t}^{(k)}\) from the \(\mathcal{N}(0,BB')\) distribution)
- Re-estimate the VAR, reapply identification and column-sign normalizations, and compute the IRFs \(\{\widehat{\Psi}_j\}^{(k)}\).
Keep the fitted IRF as the point estimate and use simulated quantiles for approximate pointwise intervals. Componentwise medians are optional summaries and need not form an IRF path satisfying one common structural model.
The following code implements the bootstrap method.
Code
library(IdSS);library(vars);library(Matrix)
data("USmonthly")
First.date <- "1965-01-01"
Last.date <- "1995-06-01"
indic.first <- which(USmonthly$DATES==First.date)
indic.last <- which(USmonthly$DATES==Last.date)
USmonthly <- USmonthly[indic.first:indic.last,]
considered.variables<-c("LIP","UNEMP","LCPI","LPCOM","FFR","NBR","TTR","M1")
y <- as.matrix(USmonthly[considered.variables])
# ===================================
# CEE with bootstrap
# ===================================
res.svar.ordering <-
svar.ordering(y,p=3,
posit.of.shock = 5,
nb.periods.IRF = 20,
inference = 2,# 0 -> no inference, 1 -> parametric bootstr.,
# 2 <- non-parametric bootstrap, 3 <- monte carlo,
# 4 <- bootstrap-after-bootstrap
nb.draws = 200,
confidence.interval = 0.90, # expressed in pp.
indic.plot = 1 # Plots are displayed if = 1.
)
Figure 3.3: IRF associated with a monetary policy shock; bootstrap method.
3.4 Bootstrap-after-bootstrap
The previous simple bootstrapping procedure deals with non-normality and small sample distribution, since we use the actual residuals. However, it does not deal with the small-sample bias, stemming, in particular, from small-sample bias associated with OLS coefficient estimates \(\{\widehat{\Phi}_j\}_{j=1,..,p}\).
The code below illustrates the small-sample bias.
Code
# Distribution of coefficients stemming from non-parametric bootstrap
n <- length(considered.variables)
h <- 5 # array row 5 is response horizon 4
par(mfrow=c(2,ifelse(round(n/2)==n/2,n/2,(n+1)/2)))
for (i in 1:n){
hist(simulated.IRFs.ordering.bootstrap[h,i,],xlab="",ylab="",
main=paste("Effect at h = ",h," on ",
considered.variables[i],sep=""),cex.main=.9)
lines(array(c(IRFs.ordering.bootstrap[h,i],
IRFs.ordering.bootstrap[h,i],0,100),c(2,2)),col="red")
lines(array(c(median.IRFs.ordering.bootstrap[h,i],
median.IRFs.ordering.bootstrap[h,i],0,100),c(2,2)),col="blue")
text(IRFs.ordering.bootstrap[h,i],25,label="Estimated response",col="red")
}
Figure 3.4: Estimated response and its bootstrap sampling approximation at horizon four. These are IRFs, not autoregressive coefficients.
The bootstrap IRF distribution need not be centered on the fitted IRF. One artificial sample illustrates a discrepancy; it is not itself a Monte Carlo coverage study.
In the following code, we perform the VAR estimation and bootstrap inference after generating artificial data. We can then compare the IRFs and confidence intervals to the ``true’’ parameters used to generate the data.
Code
# Simulate a small sample
est.VAR <- VAR(y,p=3)
Phi <- Acoef(est.VAR)
cst <- Bcoef(est.VAR)[,3*n+1]
resids <- residuals(est.VAR)
Omega <- var(resids)
B.hat <- t(chol(Omega))
y0.star <- NULL
for(k in 3:1){
y0.star <- c(y0.star,y[k,])
}
small.sample <- simul.VAR(c=cst,
Phi,
B.hat,
nb.sim = 100,
y0.star,
indic.IRF = 0)
colnames(small.sample) <- considered.variables
# Estimate the VAR with the small sample
res.svar.small.sample <-
svar.ordering(small.sample,p=3,
posit.of.shock = 5,
nb.periods.IRF = 20,
inference = 2,# 0 -> no inference, 1 -> parametric bootstr.,
# 2 <- non-parametric bootstrap, 3 <- monte carlo
nb.draws = 200,
confidence.interval = 0.90, # expressed in pp.
indic.plot = 1 # Plots are displayed if = 1.
)
Figure 3.5: Simulated IRF associated with a monetary policy shock.
Code
Code
# True IRFs
res.svar.ordering <-
svar.ordering(y,p=3,
posit.of.shock = 5,
nb.periods.IRF = 20,
inference = 0,# 0 -> no inference, 1 -> parametric bootstr.,
# 2 <- non-parametric bootstrap, 3 <- monte carlo,
# 4 <- bootstrap-after-bootstrap
indic.plot = 0 # Plots are displayed if = 1.
)
IRFs.ordering.true <- res.svar.ordering$IRFs
# Distribution of coefficients resulting from the small sample VAR
h <- 5 # array row 5 is response horizon 4
par(mfrow=c(2,ifelse(round(n/2)==n/2,n/2,(n+1)/2)))
for (i in 1:n){
hist(simulated.IRFs.small.sample[h,i,],xlab="",ylab="",
main=paste("Effect at h = ",h," on ",
considered.variables[i],sep=""),cex.main=.9)
lines(array(c(IRFs.small.sample[h,i],
IRFs.small.sample[h,i],0,100),c(2,2)),col="red")
lines(array(c(median.IRFs.small.sample[h,i],
median.IRFs.small.sample[h,i],0,100),c(2,2)),col="blue")
lines(array(c(IRFs.ordering.true[h,i],
IRFs.ordering.true[h,i],0,100),c(2,2)),col="black")
text(IRFs.small.sample[h,i],25,label="Estimated response",col="red")
text(IRFs.ordering.true[h,i],30,label="True coef.",col="black")
}
Figure 3.6: Monetary-policy responses under recursive identification: artificial-sample comparison or bias-corrected bootstrap.
The main idea of the bootstrap-after-bootstrap of Kilian (1998) is to run two consecutive bootstraps: the objective of the first is to compute the bias, which can further be used to correct the initial estimates of the \(\Phi_i\)’s. Further, these corrected estimates are used —in the second bootstrap— to compute a set of IRFs (as in the standard bootstrap).
More formally, the algorithm is as follows:
- Estimate the SVAR coefficients \(\{\widehat{\Phi}_j\}_{j=1,..,p}\) and \(\widehat{\Omega}\)
- First bootstrap. For each iteration \(k\):
- Construct a sample \[ y_t^{(k)}=\widehat{\Phi}_1 y_{t-1}^{(k)} + \dots + \widehat{\Phi}_p y_{t-p}^{(k)} + \hat\varepsilon_t^{(k)}, \] with \(\hat\varepsilon_{t}^{(k)}=\hat\varepsilon_{s_t^{(k)}}\), where the indices are sampled independently with replacement. Resample entire centered residual vectors to preserve contemporaneous dependence, and specify presample observations or a justified burn-in. Ordinary residual resampling requires serially independent innovations; heteroskedastic or dependent alternatives need a suitable bootstrap design.
- Re-estimate the VAR and compute the coefficients \(\{\widehat{\Phi}_j\}_{j=1,..,p}^{(k)}\).
- Perform \(N\) replications and compute the mean coefficients \(\{\widehat{\Phi}_j\}_{j=1,..,p}^*\).
- Approximate the bias terms by \(\widehat{\Theta}_j=\widehat{\Phi}_j^*-\widehat{\Phi}_j\).
- Construct \(\widetilde\Phi_j=\widehat\Phi_j-\widehat\Theta_j\). This estimates and subtracts mean bias; it does not produce an exactly unbiased finite-sample estimator. Adjust the simulation intercept to preserve the fitted unconditional mean.
- Second bootstrap. For each iteration \(k\):
- Construct a sample now from \[ y_t^{(k)}=\widetilde{\Phi}_1 y_{t-1}^{(k)} + \dots + \widetilde{\Phi}_p y_{t-p}^{(k)} + \hat\varepsilon_t^{(k)}. \]
- Re-estimate the VAR and compute the coefficients \(\{\widehat{\Phi}^*_j\}_{j=1,..,p}^{(k)}\).
- Construct the bias-corrected estimates \(\widetilde{\Phi}_j^{*(k)}=\widehat{\Phi}_j^{*(k)}-\widehat{\Theta}_j\).
- Compute the associated IRFs \(\{\widetilde{\Psi}_j^{*(k)}\}_{j\ge 1}\).
- Repeat \(N\) times and use simulated quantiles for approximate pointwise intervals under the maintained bootstrap assumptions. Retain the fitted response as the point estimate; componentwise medians are optional summaries.
It should be noted that correcting for the bias can generate non-stationary results (\(\tilde \Phi\) with eigenvalue with modulus \(>1\)). Solution (Kilian (1998)):
For a stable original fit, test the spectral radius of the bias-corrected companion matrix. If it is at least one, replace the fixed estimated bias by \(\delta\widehat\Theta_j\), with \(\delta=1,.99,.98,\ldots,0\), until stability is restored. The weight multiplies the original bias each time; it must not compound successive shrinkage factors. Apply the corresponding stability rule to corrected bootstrap estimates; an unstable uncorrected bootstrap fit receives no stationarity-based bias correction. This procedure is intended for a stationary data-generating model, not as a cure for a genuine unit root.
The following code implements the bootstrap-after-bootrap method.
Code
library(IdSS);library(vars);library(Matrix)
data("USmonthly")
First.date <- "1965-01-01"
Last.date <- "1995-06-01"
indic.first <- which(USmonthly$DATES==First.date)
indic.last <- which(USmonthly$DATES==Last.date)
USmonthly <- USmonthly[indic.first:indic.last,]
considered.variables<-c("LIP","UNEMP","LCPI","LPCOM","FFR","NBR","TTR","M1")
y <- as.matrix(USmonthly[considered.variables])
# ===================================
# CEE with bootstrap-after-bootstrap
# ===================================
res.svar.ordering <-
svar.ordering(y,p=3,
posit.of.shock = 5,
nb.periods.IRF = 20,
inference = 4,# 0 -> no inference, 1 -> parametric bootstr.,
# 2 <- non-parametric bootstrap, 3 <- monte carlo,
# 4 <- bootstrap-after-bootstrap
nb.draws = 200,
confidence.interval = 0.90, # expressed in pp.
indic.plot = 1 # Plots are displayed if = 1.
)
Figure 3.7: Monetary-policy responses under recursive identification: artificial-sample comparison or bias-corrected bootstrap.
Code
As an alternative, function VAR.Boot of package VAR.etp (Kim (2022)) can be used to operate the bias-correction approach of Kilian (1998):
Code
## inv(-1) inc(-1) con(-1) inv(-2) inc(-2) con(-2) const
## [1,] -0.31367 0.14922 0.98889 -0.14018 0.11819 0.95738 -0.018501
## [2,] -0.31963 0.14599 0.96122 -0.16055 0.11460 0.93439 -0.016722
## [3,] -0.31963 0.14599 0.96122 -0.16055 0.11460 0.93439 -0.016722