RDP 2025-03: Fast Posterior Sampling in Tightly Identified SVARs Using ‘Soft’ Sign Restrictions 4. Numerical Illustration and Monte Carlo Experiments
May 2025
- Download the Paper 1.45MB
This section illustrates how our method works and explores its efficiency relative to accept-reject sampling using a simple bivariate model as an example. This allows us to easily and transparently control the size of the identified set as well as visualise the performance of the algorithm. We first consider a case where the identified set is connected before illustrating the ability of our approach to navigate the more challenging circumstance where the identified set consists of disconnected parameter regions. We consider higher-dimensional models in the empirical applications (Section 5).
4.1 Connected identified set
Let yt = (pt, qt)′ contain log price and quantity, and consider imposing the following pattern of sign restrictions on the impulse responses:[13]
The restrictions imply that the first equation of the model can be interpreted as a supply curve and the second as a demand curve. The price elasticity of supply is .[14] Consider augmenting the sign restrictions with the elasticity restriction with .
Let vech and note that (2) can be represented as
where we leave it implicit that (e.g. Baumeister and Hamilton 2015).
It can be shown that the sign restrictions generate the following identified set for :
The upper bound of the identified set converges to zero as and to (i.e. the lower bound) as . The elasticity restriction therefore provides a convenient way to explore the efficiency of our algorithm relative to accept-reject sampling as the size of the identified set changes.
To illustrate the sampling approach in this setting, we fix and assume the goal is to draw from the uniform distribution over , which is equivalent to drawing from a uniform distribution over (Baumeister and Hamilton 2015). The accept-reject algorithm can be interpreted as drawing from a uniform distribution over the identified set given the sign normalisations only, and rejecting draws of that violate the sign restrictions.[15] In contrast, the slice sampler generates a Markov chain whose invariant distribution is the distribution over induced by . For , this distribution assigns positive density outside , so the slice sampler will return draws of outside of with positive probability, though draws of within will be sampled with higher probability. The resampling step then discards draws outside of and reweights the remaining draws so that the resulting distribution is (approximately) uniform.
Figure 3 illustrates the sampler under different values of .[16] When = 100 (top left panel), which we take to approximate the behaviour of the algorithm as , values of that violate the sign restrictions are essentially not penalised. The slice sampler therefore generates draws of Q from a uniform distribution over (2), which corresponds to being uniformly distributed over the interval . When (top right panel), values of that violate the sign restrictions have their density penalised, but a substantial proportion of draws obtained via slice sampling violate the sign restrictions. Values of that satisfy the sign restrictions but are close to the bounds of the identified set also have their density penalised, so the distribution of draws satisfying the sign restrictions is not uniform. Decreasing (bottom two panels) more strongly penalises values of that violate the sign restrictions, so a far smaller proportion of draws violate the restrictions, and the effective sample size following importance sampling is much larger. Following importance sampling, the draws are approximately uniformly distributed over .

Notes: ‘Slice’ is distribution of draws obtained using slice sampler before resampling using importance weights; ‘RS’ is distribution after resampling. Vertical lines represent bounds of identified set. Parameter values are and . Based on one million draws.
To examine the computational efficiency of the sampling algorithms in this setting, we obtain 10,000 draws from in each of 100 replications where the slice sampler is initialised at a different randomly generated value. We compute the average time taken to obtain the draws and the average effective sample size. If wk is the importance weight attached to the kth draw, the effective sample size (expressed as a percentage of the original number of draws) is To illustrate the trade-off between speed and effective sample size, we consider values of {0.1,0.01,0.001,0.0001} and {1,0.1,0.01} (Table 1).[17]
Algorithm | Speed (seconds) | Effective sample size (%) | |||||
---|---|---|---|---|---|---|---|
= 1 | = 0.1 | = 0.01 | = 1 | = 0.1 | = 0.01 | ||
Accept-reject | 0.19 | 1.27 | 12.19 | 100.00 | 100.00 | 100.00 | |
= 0.1 | 0.49 | 0.49 | 0.47 | 78.41 | 21.33 | 2.27 | |
= 0.01 | 0.52 | 0.76 | 0.86 | 97.20 | 81.20 | 21.48 | |
= 0.001 | 0.51 | 0.79 | 1.26 | 99.36 | 97.45 | 81.19 | |
= 0.0001 | 0.51 | 0.78 | 1.25 | 99.25 | 98.12 | 96.78 | |
Notes: Averages based on 100 Monte Carlo replications with 10,000 draws of Q. controls width of identified set. controls penalisation of parameter values that violate (or are close to violating) sign restrictions in slice sampler. |
When is relatively large, so that the identified set is ‘wide’, accept-reject sampling is more efficient than our approach, generating more effective draws in less time. As decreases and the size of the identified set shrinks, the computational efficiency of our approach increases relative to accept-reject. For example, when = 0.01, on average it takes 12.2 seconds to generate 10,000 draws using accept-reject, whereas the slice sampler with = 0.0001 generates around 9,700 effective draws in 1.3 seconds. For a given value of , increasing tends to increase computing time but also the effective sample size, since fewer candidate draws violate the sign restrictions.
4.2 Disconnected identified set
In general, may be made up of disconnected regions. Sampling from a distribution that is supported on disconnected parameter regions can pose challenges for MCMC algorithms, because the Markov chain may become ‘stuck’ in one region and not adequately traverse the target distribution. In contrast, by virtue of its independent proposal density, the accept-reject algorithm does not suffer from this problem. In this exercise, we illustrate our sampling approach in a setting where the identified set is disconnected.
Consider imposing the restriction that the impulse response of the first variable to the second shock is weakly greater than some positive scalar: for (when at any value of ). All other impulse responses are unrestricted and we continue to impose the sign normalisation . This example nests Example B.5 in Giacomini and Kitagawa (2021b) when . When , the restrictions generate the following identified set for :
which is the union of two disconnected intervals.[18] For a given value of , the total length of the identified set shrinks with increasing . This example therefore provides a simple setting to illustrate our sampler when the identified set is disconnected.
Figure 4 illustrates the sampler under different values of . Even at small values of , the sampler continues to cover the identified set – and thus generate draws from the target distribution – despite the identified set being disconnected. In the case where = 0.0001, 55.4 per cent of draws lie within the first interval, which is close to the theoretical probability under the uniform distriution (55.7 per cent). Our sampler therefore appears to adequately mix across the two regions.

Notes: ‘Slice’ is distribution of draws obtained using slice sampler before resampling using importance weights; ‘RS’ is distribution after resampling. Vertical lines represent bounds of identified set. Parameter values are and = 0.5. Based on one million draws.
These results point to the potential for our approach to improve the computational efficiency of posterior sampling under sign restrictions when the restrictions substantially truncate the identified set, even in cases where the identified set is disconnected. To assess whether the approach can deliver on this promise, in the next section we turn to a realistic empirical application.
Footnotes
In this example, the sign normalisations on the diagonal elements of A0 are redundant given the sign restrictions. [15]
In this exercise, the slice sampler is initialised at a random draw of Z from a matrix standard normal distribution. [16]
The results are obtained using Matlab R2023a on a desktop computer running Microsoft Windows 10 Enterprise with an Intel Core i7-9700 CPU @ 3.00GHz, 8 cores and 128 GB RAM. [17]
This expression implicitly assumes otherwise the first interval is empty. [18]