RDP 2025-03: Fast Posterior Sampling in Tightly Identified SVARs Using ‘Soft’ Sign Restrictions 4. Numerical Illustration and Monte Carlo Experiments

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]

(14) A 0 1 =[ + + + ]

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 ω( ϕ,Q ) e 1,2 A 0 e 1,2 / e 1,2 A 0 e 2,2 = ( Σ tr 1 e 1,2 ) q 1 / ( Σ tr 1 e 2,2 ) q1 .[14] Consider augmenting the sign restrictions with the elasticity restriction ω( ϕ,Q ) ω ¯ with ω ¯ 0 .

Let vech ( Σ tr )= ( σ 11 , σ 21 , σ 22 ) and note that 𝒪 (2) can be represented as

(15) 𝒪( 2 )={ [ cosθ sinθ sinθ cosθ ] }{ [ cosθ sinθ sinθ cosθ ] }

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 θ :

(16) I S θ ( ϕ|S )=[ arctan( σ 22 σ 21 ),arccot( σ 21 σ 22 σ 11 σ 22 ω ¯ ) ]

The upper bound of the identified set converges to zero as ω ¯ and to arctan( σ 22 / σ 21 ) (i.e. the lower bound) as ω ¯ 0 . 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 𝒬( ϕ|S ) , which is equivalent to drawing θ from a uniform distribution over I S θ ( ϕ|S ) (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 f Δ ( Z ) . For Δ>0 , this distribution assigns positive density outside I S θ ( ϕ|S ) , so the slice sampler will return draws of θ outside of I S θ ( ϕ|S ) with positive probability, though draws of θ within I S θ ( ϕ|S ) will be sampled with higher probability. The resampling step then discards draws outside of I S θ ( ϕ|S ) 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 Δ=0.1 (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 I S θ ( ϕ ) .

Figure 3: Illustration of Sampling Using Soft Sign Restrictions
Figure 3: Illustration of Sampling Using Soft Sign Restrictions - A four panel chart illustrating how our sampler works in a simple bivariate model. Each panel features two overlaid histograms representing the distribution of parameter draws obtained using using the slice sampler but before applying the importance sampling step and after applying the step. Each panel corresponds to a different value of the penalisation parameter, Delta. The chart illustrates that the resampled draws are approximately uniformly distributed over the identified set for the different values of Delta. As the value of the penalisation parameter decreases, fewer draws violate the sign restrictions before the resampling step is applied, and the distributions before and after resampling look more similar.

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 ϕ= ( σ 11 , σ 21 , σ 22 ) = ( 1,0.5,1 ) and ω ¯ =1 . Based on one million draws.

To examine the computational efficiency of the sampling algorithms in this setting, we obtain 10,000 draws from 𝒬( ϕ|S ) 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 ESS=( 100/K )× ( Σ k=1 K w k ) 2 / Σ k=1 K w k 2 . 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]

Table 1: Performance of Sampling Algorithms – Bivariate Model
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, 𝒬( ϕ|S ) 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: e 1,2 A 0 1 e 2,2 = e 1,2 Σ tr q 2 λ for 0λ σ 11 (when λ> σ 11 ,I S θ ( ϕ|S )={ } at any value of ϕ ). All other impulse responses are unrestricted and we continue to impose the sign normalisation diag( A 0 ) 0 2×1 . This example nests Example B.5 in Giacomini and Kitagawa (2021b) when λ=0 . When σ 21 <0 , the restrictions generate the following identified set for θ :

(17) I S θ ( ϕ|S )=[ arctan( σ 22 σ 21 ),arcsin( λ σ 11 ) ] [ π 2 ,min{ πarcsin( λ σ 11 ),π+arctan( σ 22 σ 21 ) } ]

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.

Figure 4: Illustration of Sampling Using Soft Sign Restrictions – Disconnected Identified Set
Figure 4: Illustration of Sampling Using Soft Sign Restrictions – Disconnected Identified Set - A four panel chart illustrating how our sampler works in a simple bivariate model when the identified set consists of disconnected regions. Each panel features two overlaid histograms representing the distribution of parameter draws obtained using using the slice sampler but before applying the importance sampling step and after applying the step. Each panel corresponds to a different value of the penalisation parameter, Delta. The chart illustrates that the resampled draws are approximately uniformly distributed over the identified set under the different values of Delta. As the value of the penalisation parameter decreases, fewer draws violate the sign restrictions before the resampling step is applied, and the distributions before and after resampling look more similar.

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 ϕ= ( σ 11 , σ 21 , σ 22 ) = ( 1,0.5,1 ) 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

These restrictions require e 1,2 A 0 1 e 1,2 = e 1,2 Σ tr q 1 0 , e 2,2 A 0 1 e 1,2 = e 2,2 Σ tr q 1 0 , e 1,2 A 0 1 e 2,2 = e 1,2 Σ tr q 2 0 and e 2,2 A 0 1 e 2,2 = e 2,2 Σ tr q 2 0 . [13]
The price elasticity of supply is equivalently given by the impulse response of qt to a demand shock that raises pt by one unit (i.e. e 2,2 A 0 1 e 2,2 / e 1,2 A 0 1 e 2,2 = e 2,2 Σ tr q 2 / e 1,2 Σ tr q 2 ). [14]

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 λ σ 11 σ 22 / σ 22 2 + σ 21 2 otherwise the first interval is empty. [18]