Page 1 of 1

IMPULSE() instruction code

Posted: Sun Mar 27, 2011 11:14 am
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

Re: IMPULSE() instruction code

Posted: Mon Mar 28, 2011 6:02 pm
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.