IMPULSE() instruction code

Questions and discussions on Vector Autoregressions
asmith05
Posts: 15
Joined: Thu Mar 24, 2011 8:33 pm

IMPULSE() instruction code

Unread post by asmith05 »

Hello,

Does anyone have the underlying code for the IMPULSE() instruction? I am wanting to compute regime dependent impulse response functions from a MSVAR. Therefore, I can't use the IMPULSE() instruction since I must reference a MODEL=varmodel. I want to tell it which coefficient matrix and which covariance matrix to use when computing the impulse responses. Basically in the end I want 2 sets of impulse response functions, one set for each regime. I think I can accomplish this if I can tell RATS to compute 2 impblk matrices, one for each regime.

Thanks for any help!

Lee
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IMPULSE() instruction code

Unread post by TomDoan »

The inputs to IMPULSE are the model, the coefficients and the covariance matrix or the factor matrix. The way that you would handle this is to use %MODELSETCOEFFS to reset the coefficients of the model. Note that they need to match up with the arrangement of the coefficients in the model, which isn't always the case for MSVAR's (where organizing regressors by lag tends to make the most sense, which the RATS VAR models are set up with the regressors organized by variable). The procedures VARCALC and VARLAGSELECT show how to rearrange the coefficients for use with %MODELSETCOEFFS.
Post Reply