RATS 11
RATS 11

Procedures /

IRFRESTRICT Procedure

Home Page

← Previous Next →

@IRFRestrict can be used to build up (one restriction at a time) the \({\bf{R}}\) matrix in

 

(1)  \({\bf{R}}vec({\bf{B}}) = 0\)

 

representing restrictions on the impact matrix \({\bf{B}}\) to achieve certain zero restrictions in the impulse responses at zero or more steps. The set of joint solutions to the restrictions can be written in the form:

 

(2) \(vec({\bf{B}}) = {{\bf{R}}^ \bot }\Theta \)

 

where \(\Theta \) is a vector of free parameters which can be estimated using CVMODEL. This is a "B" style structural model.

 

@IRFRestrict( options ) r

Parameters

r

(input and output) the matrix being constructed. If you do more than one

analysis of this type, either use a different matrix, or dimension to 0,0

before starting the second.

Options (all are required)

IRF=response matrix to unit impact shocks for the horizon being constrained

VARIABLE=variable whose response is being constrained

SHOCK=shock whose response is being constrained

Example

*

* This will do constraints of the form

*

* Impact:

* . 0 0 0

* . . . 0

* . . . .

* . . . .

*

* First step:

* . . . .

* . . 0 0

* . . . .

* . . . .

*

* This is just identified since it has 0, 1, 2 and 3 zeros in the four columns (in some order).

*

impulse(model=peersman,factor=%identity(%nvar),steps=3,results=irfs)

compute step0=%xt(irfs,1)

compute step1=%xt(irfs,2)

***************************************************************************

dec rect rr(0,0)

@IRFRestrict(irf=step0,variable=1,shock=2) rr

@IRFRestrict(irf=step0,variable=1,shock=3) rr

@IRFRestrict(irf=step0,variable=1,shock=4) rr

@IRFRestrict(irf=step0,variable=2,shock=4) rr

@IRFRestrict(irf=step1,variable=2,shock=3) rr

@IRFRestrict(irf=step1,variable=2,shock=4) rr

*

compute rp=%perp(rr)

dec vect theta(%cols(rp))

dec frml[rect] lrfrml

*

frml lrfrml = %vectorect(rp*theta,%nvar)

*

* Get guess values as closest to a Cholesky factor.

* (This also gets the dimension of THETA correct).

*

compute [vect] theta=%ginv(rp)*%vec(%chol(%sigma))

*

nonlin theta

cvmodel(b=lrfrml,factor=f,dmatrix=identity) %sigma

disp "Impact responses with multi-step restrictions" ###.### f

disp "Step one responses" ###.### step1*f


 


Copyright © 2025 Thomas A. Doan