RATS 11.1
RATS 11.1

Procedures /

BQDODRAWS Procedure

Home Page

← Previous Next →

@BQDODRAWS generates a set of Monte Carlo draws for a 2-variable Blanchard-Quah structural VAR. This identifies the second shock as having no long-run effect on the first variable (which should be put into the VAR in differenced form). In the original BQ paper, this second shock would be the "demand" shock, while the unconstrained first shock is "supply".

 

This first simulates the VAR lag coefficients and covariance matrix, then uses the recomputed lag sums to compute the Blanchard-Quah factor of the new draw for the covariance matrix. It also forces an positive impact of shock 2 on variable 1 (since the long-run restriction doesn't itself identify the sign of the response). This avoids two common problems in doing draws for a model like this:

a.using the original VAR lag sums rather than the recomputed ones

b.failing to properly sign the impact

 

(a) usually is only a minor problem; (b) is not—having a percentage of "demand" shocks being (randomly) signed negative will throw off the error bands for impulse responses.

 

The options are the same as for @MCVARDoDraws, except that the default for the ACCUMULATE option is ||1||; the responses of the first variable are undifferenced.


@BQDoDraws( options )

Options

MODEL=model to analyze [required]

You must have just estimated this.

 

STEP=number of response steps[48]

DRAWS=number of Monte Carlo draws[1000]

 

ACCUMULATE=list of variables (by position) to accumulate [||1||]

The ACCUMULATE option allows you to estimate the VAR in differences, then convert the impulse responses to the responses of the levels. For instance, ACCUMULATE=||1|| will "undifference" the 1st variable.

Example

This is from the YUQUARTERLY.RPF program in the Faust and Leeper(1997) replication. It estimates the VAR, does the draws, and then uses both @MCGRAPHIRF and @MCFEVDTABLE to get impulse response graphs and decomposition of variance tables.

 

system(model=varmodel)

var gdpadjust uradjust

lags 1 to 8

det constant

end(system)

*

estimate(noprint)

@BQDoDraws(model=varmodel,draws=10000,steps=40)

@MCGraphIRF(model=varmodel,varlabels=||"Y","U"||,$

  shocklabels=||"Supply","Demand"||)

*

disp "Table 1-Variance Decomposition. Percentage Explained by Demand Shock"

@MCFEVDTable(model=varmodel,varlabels=||"Y","U"||,percent=||.025,.50,.975||,$

  shocklabels=||"Supply","Demand"||,table=byshock,$

  horizons=||1,2,3,4,8,12,24,40||)


 


Copyright © 2026 Thomas A. Doan