Dimension of dr_.ghx awkard (zeros omitted?)

Hi,

I want to build a state transition and measurement equation from the decision rules that DYNARE produces. For my DSGE model, dr_.ghx is roughly of dimension 70 by 200. That seems awkward to me as it seems to imply that there is less variables (70) in the model than there is states (200). My model is such that DYNARE automatically generates some states, but I would assume that it also reports transition equations as part of the output in dr_.ghx.

Could it be, that DYNARE does not include transition rules in dr_.ghx when the entries are zero? In other words, can I just assume that what is missing are zeros?

Thanks a lot for any comments - Matthias

dr.ghx isn’t the transition matrix. It is the coefficient of all endogenous variables as a function of state variables

Most likely your model has lags on more than one period.
dr_.ghx doesn’t contain either the auxiliary equations required to get a transition matrix in that case.

Best

Michel

Michel,

thanks for the reply. I would like to construct the state transition equation from the output of DYNARE. Is that possible? For models with just one period lag, I believe that this can be done from dr_.ghx and dr_.ghu. But how can I compute the state transition equation for models with more than one period lag?

Thanks for your help
Matthias

In version 3,

the transition equation is

where yhat_t is the vector of endogenous variables less the steady state, augmented of lagged state variables when there are lags on more than one period.

A is square matrix with zero columns corresponding to endogenous variables that aren’t state variables (don’t appear in the model with a lag)

You can obtain A and B matrix with the following expression

to be place after stoch_simul

The variables are in the same order as in dr_.ghx, the auxiliary lagged variables come at the end of the vector.

The is currently no simple way to obtain the transition matrix in version 4. I will write such a function

Best

Michel

[quote=“MichelJuillard”]In version 3,

the transition equation is

where yhat_t is the vector of endogenous variables less the steady state, augmented of lagged state variables when there are lags on more than one period.

A is square matrix with zero columns corresponding to endogenous variables that aren’t state variables (don’t appear in the model with a lag)

You can obtain A and B matrix with the following expression

to be place after stoch_simul

The variables are in the same order as in dr_.ghx, the auxiliary lagged variables come at the end of the vector.

The is currently no simple way to obtain the transition matrix in version 4. I will write such a function

Best

Michel[/quote]

Thats working,thanks M :stuck_out_tongue: ichel