RATS 11
RATS 11

Procedures /

MCSIGNRESTRICT Procedure

Home Page

← Previous Next →

@MCSignRestrict does sign restrictions by Monte Carlo methods as described in Uhlig(2005), by doing outer draws for the VAR coefficients and inner draws for rotations of a factor of the covariance matrix. This builds up the responses in the standard %%RESPONSES array, and you can post-process the output using @MCGraphIRF and similar procedures. Unlike the original Uhlig paper, this allows for identification of multiple shocks. Note, however, that the results for any specific shock may (and generally will) be different when you include it with other shocks since it may be difficult to find a factorization which makes all the shocks meet their restrictions.

 

The assumption is that the last estimation done before this is an ESTIMATE on the input VAR model.

 

@MCSignRestrict(model=model,constraints=constraints,other options)

Options

MODEL=model to analyze [required]

 

NKEEP=desired number of accepted draws[1000]

 

VARDRAWS=outer draws for the VAR (joint coefficients/covariance matrix) [200]

SUBDRAWS=inner draws for rotations given the VAR draw [200]

 

NSTEP=number of steps of impulse responses [20]

 

ACCUMULATE=||vector of positions|| (not used)

Indicates which variables (by position in the model) need to be accumulated (integrated)

 

CONSTRAINTS=VECT[VECT[VECT[INT]]] describing the sign restrictions to be imposed.

Each shock is described as a VECT[VECT[INT]] (which is defined as the type SignDesc). Each element in that is a VECT[INT] which has three elements: +/- the position in the model, the start step constrained and the end step constrained, where, in keeping with the standard notation in the literature, k=1 is the "impact" (step 0 as RATS describes it).

 

EXPAND/[NOEXPAND]

Add unmodeled shocks to complete a factorization. (This allows for computing the FEVD).

 

SPECIAL=FUNCTION[INTEGER](RECT) [not used]

This must be a FUNCTION which returns an extra rejection criterion (1 = reject) which is applied to an otherwise accepted draw which meets the desired constraints. It is applied to the "flattened" copy of the impulse responses.

 

Example

This is the set up for the 3 variable model in Farrant and Peersman(2006). The three variables in the VAR are real GDP, prices and exchange rates in that order. This identifies a full set of three shocks, the first of which restricts just the first two variables (non-negative for GDP, non-positive for prices); the others constrain all variables, though exchange ranges are constrained only for a single step.

 

dec SignDesc SupplyDesc(2)

compute SupplyDesc(1)=||+1,1,4||

compute SupplyDesc(2)=||-2,1,4||

dec SignDesc DemandDesc(3)

compute DemandDesc(1)=||+1,1,4||

compute DemandDesc(2)=||+2,1,4||

compute DemandDesc(3)=||-3,1,1||

dec SignDesc NominalDesc(3)

compute NominalDesc(1)=||+1,1,4||

compute NominalDesc(2)=||+2,1,4||

compute NominalDesc(3)=||+3,1,1||

*

compute [vect[SignDesc]] SignConstraints=||SupplyDesc,DemandDesc,NominalDesc||

 

The sign restriction model is simulated using the following:

 

@MCSignRestrict(model=var3,nsteps=nsteps,constraints=SignConstraints,$

    accum=||1,2,3||,nkeep=nkeep,vardraws=VARDraws)

 

Because all three variables are included in differenced form in the model, the ACCUM option is used to do the IRF's for the levels instead, and its the levels that are checked for the sign restrictions.

 


Copyright © 2025 Thomas A. Doan