RDP 2023-07: Identification and Inference under Narrative Restrictions Appendix A: Numerical Implementation
October 2023
- Download the Paper 1.10MB
This appendix describes a general algorithm to implement the robust Bayesian procedure under NR. GK21 propose numerical algorithms for conducting robust Bayesian inference in SVARs identified using traditional sign and zero restrictions. Their Algorithm 1 uses a numerical optimisation routine to obtain the lower and upper bounds of the identified set at each draw of . Obtaining the bounds via numerical optimisation may be difficult under the set of NR considered here, since the problem is non-convex. We therefore adapt Algorithm 2 of GK21, which approximates the bounds of the identified set at each draw of using Monte Carlo simulation.
Algorithm A.1. Let be the set of NR and let be the set of traditional sign restrictions (excluding the sign normalisation). Assume the object of interest is
- Step 1: Specify a prior for and obtain the posterior .
- Step 2: Draw from and check whether is empty using the subroutine below.
- Step 2.1: Draw an n × n matrix of independent standard normal random variables, Z, and let be the QR decomposition of Z.[18]
Step 2.2: Define
where is the jth column of .
- Step 2.3: Check whether Q satisfies and . If so, retain Q and proceed to Step 3. Otherwise, repeat Steps 2.1 and 2.2 (up to a maximum of L times) until Q is obtained satisfying the restrictions. If no draws of Q satisfy the restrictions, approximate as being empty and return to Step 2.
- Step 3: Repeat Steps 2.1–2.3 until K draws of Q are obtained. Let be the K draws of Q that satisfy the restrictions and let qj,k be the jth column of Qk. Approximate by .
- Step 4: Repeat Steps 2–3 M times to obtain for m = 1, ...,M. Approximate the set of posterior means using the sample averages of and .
- Step 5: To obtain an approximation of the smallest robust credible region with credibility define and let be the sample quantile of . An approximated smallest robust credible interval for is an interval centered at with radius .
Algorithm 1 approximates at each draw of via Monte Carlo simulation. The approximated set will be too narrow given a finite number of draws of Q, but the approximation error will vanish as the number of draws goes to infinity. Montiel Olea and Nesbit (2021) derive bounds on the number of draws required to control approximation error.
The algorithm may be computationally demanding when the restrictions substantially truncate , because many draws of Q may be rejected at each draw of .[19] However, the same draws of Q can be used to compute and for different objects of interest, which cuts down on computation time. For example, the same draws can be used to compute the impulse responses of all variables to all shocks at all horizons of interest. Other quantities of interest can also be computed, such as impulse responses to ‘unit’ shocks (e.g. Read 2022b), forecast error variance decompositions, elements of A0 or A+, historical decompositions or structural shocks.
Footnotes
This is the algorithm used by Rubio-Ramírez et al (2010) to draw from the uniform distribution over , except that we do not normalise the diagonal elements of R to be positive. This is because we impose a sign normalisation based on the diagonal elements of in Step 2.2. [18]
Read and Zhu (forthcoming) develop more computationally efficient algorithms for obtaining draws of Q from a uniform distribution over the (conditional) identified set given a broad class of identifying restrictions, including NR. [19]