RDP 2022-04: The Unit-effect Normalisation in Set-identified Structural Vector Autoregressions Appendix C: Description of Numerical Algorithms
October 2022
- Download the Paper 2,225KB
This section describes the numerical algorithms that I use in the empirical application of Section 5. I first describe at a high level a general algorithm used to conduct robust Bayesian inference. I subsequently provide details about how the algorithm is implemented under the different sets of identifying restrictions.
Algorithm C1 (robust Bayesian inference). Assume the parameter of interest is ${\tilde{\eta}}_{i,1,h}\left(\varphi ,Q\right)$. For k = 1,...,K:
Step 1: Draw ${\varphi}_{k}$ from ${\pi}_{\varphi |Y}.$
Step 2: Check whether $Q\left({\varphi}_{k}|S,F\right)$ is empty. If so, return to Step 1. If not, proceed to Step 3.
Step 3: Record whether $0\in {\eta}_{1,1,0}\left(\varphi |S,F\right).$
Step 4: Compute $\ell \left({\varphi}_{k}\right)=\underset{Q\in Q\left({\varphi}_{k}|S,F\right)}{\mathrm{min}}{\tilde{\eta}}_{i,1,h}\left({\varphi}_{k},Q\right)$ and $u\left({\varphi}_{k}\right)=\underset{Q\in Q\left({\varphi}_{k}|S,F\right)}{\mathrm{max}}{\tilde{\eta}}_{i,1,h}\left({\varphi}_{k},Q\right).$
Given the output of Algorithm C1, the set of posterior medians can be approximated by an interval with lower bound (upper bound) equal to the posterior median of $\ell \left({\varphi}_{k}\right)\text{\hspace{0.17em}}\left(u\left({\varphi}_{k}\right)\right).$ A robust credible interval with credibility $1-\tau $ can be approximated by an interval with lower bound equal to the $\tau /2$ quantile of $\ell \left({\varphi}_{k}\right)$ and upper bound equal to the $1-\tau /2$ quantile of $u\left({\varphi}_{k}\right)$.^{[27]} If D is some hypothesis about ${\tilde{\eta}}_{i,1,h}$ (i.e. that it lies within a specified interval), the posterior lower probability assigned to the hypothesis can be approximated by the posterior probability that the identified set is contained entirely within the interval D (i.e. ${K}^{-1}{\Sigma}_{k=1}^{K}1\left({\tilde{\eta}}_{i,1,h}\left({\varphi}_{k}|S,F\right)\subset D\right)$, where 1(.) is the indicator function). The posterior upper probability can be approximated by the posterior probability that the identified set intersects the interval D (i.e. ${K}^{-1}{\Sigma}_{k=1}^{K}1\left({\tilde{\eta}}_{i,1,h}\left({\varphi}_{k}|S,F\right)\cap D\ne \varnothing \right)$). To give an example, if the hypothesis of interest is that the output response is weakly negative at horizon h, D = $\left(-\infty ,0\right]$.
How Steps 2, 3 and 4 of Algorithm C1 are implemented depends on whether the identifying restrictions constrain a single column or multiple columns of Q . When the restrictions constrain a single column of Q only (i.e. under Restrictions (1) and (2)), I check whether the identified set is non-empty at each draw of $\varphi $ using Algorithm 4.1 in Read (2022).^{[28]} I also check whether $Q\left(\varphi |\tilde{F},\tilde{S}\right)$ is non-empty (and thus whether ${\eta}_{1,1,0}\left(\varphi |S,F\right)$ includes zero) using this algorithm. I approximate the bounds of the identified set at each draw of $\varphi $ by obtaining 10,000 draws of Q from a uniform distribution over $Q\left(\varphi |S,F\right)$, computing ${\tilde{\eta}}_{i,1,h}\left(\varphi ,Q\right)$ at each draw of Q and taking the minimum and maximum over the draws of Q .^{[29]} I draw from the uniform distribution over $Q\left(\varphi |S,F\right)$ using the Gibbs sampler described in Read (2022).
Restriction (3) includes restrictions on the historical decomposition. The contribution of the j th structural shock to the one-step-ahead forecast error in variable i in period t is ${H}_{i,j,t}={\eta}_{i,j,0}\left(\varphi ,Q\right){\epsilon}_{j,t}={{e}^{\prime}}_{i,n}{\Sigma}_{tr}{q}_{j}{{q}^{\prime}}_{j}{\Sigma}_{tr}^{-1}{u}_{t}.$ The restriction that the monetary policy shock was the ‘overwhelming’ contributor to the observed unexpected change in the federal funds rate means that the absolute contribution of the monetary policy shock to the forecast error in the federal funds rate is greater than the sum of the absolute contributions of all other shocks, or $\left|{H}_{i,j,t}\right|\ge {\Sigma}_{k\ne j}\left|{H}_{i,k,t}\right|.$ This is a restriction on the historical decomposition that simultaneously constrains all columns of Q. Consequently, it is necessary to numerically approximate whether $Q\left(\varphi |S,F\right)$ and $Q\left(\varphi |\tilde{F},\tilde{S}\right)$ are empty using simulation-based algorithms. I approximate identified sets as being empty if I cannot obtain a draw of Q satisfying the (augmented) identifying restrictions after 100,000 draws. When approximating the bounds of the identified set for ${\tilde{\eta}}_{i,1,h}\left(\varphi ,Q\right)$, draws of Q from the uniform distribution over $Q\left(\varphi |S,F\right)$ are obtained using the accept-reject algorithm described in Giacomini et al (2021a). The numerical methods used to obtain the results under these restrictions are computationally burdensome, so I base the results on 1,000 (rather than 10,000) draws of $\varphi $ such that the identified set is non-empty.
In generating the results under the conditionally uniform prior, I obtain a single draw of Q from the uniform distribution over $Q\left(\varphi |S,F\right)$ at each draw of $\varphi $ using the algorithms described above and transform the draws of $\left(\varphi ,Q\right)$ into impulse responses via ${\tilde{\eta}}_{i,1,h}\left(\varphi ,Q\right)$.
Footnotes
This construction of the robust credible interval differs to the shortest robust credible interval in Giacomini and Kitagawa (2021); computing the shortest credible interval requires searching over a grid of possible values, which can be computationally difficult when the identified set is sometimes unbounded. The two constructions of the robust credible interval are similar under Restriction (3) (where the identified set is bounded at every posterior draw). [27]
This algorithm extends an algorithm proposed in Amir-Ahmadi and Drautzburg (2021) to additionally allow for zero restrictions, and requires solving a simple linear program. [28]
Under Restriction (2), the set of posterior medians and robust credible intervals are similar, but a little wider, when approximating the bounds of the identified set using a gradient-based numerical optimisation routine. [29]