Page 1 of 1

dimension of dr_.ghx awkard (zeros omitted?)

PostPosted: Tue Jan 02, 2007 7:45 pm
by matrose
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

PostPosted: Wed Jan 03, 2007 7:45 pm
by MichelJuillard
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

PostPosted: Wed Jan 03, 2007 8:31 pm
by matrose
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

PostPosted: Thu Jan 04, 2007 9:52 am
by MichelJuillard
In version 3,

the transition equation is
yhat_{t} = A yhat_{t-1}+B u_{t}

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
[A, B] = kalman_transition_matrix(dr_)

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

Re: dimension of dr_.ghx awkard (zeros omitted?)

PostPosted: Mon Aug 13, 2012 10:25 am
by dupko
MichelJuillard wrote:In version 3,



the transition equation is

yhat_{t} = A yhat_{t-1}+B u_{t}

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
[A, B] = kalman_transition_matrix(dr_)


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


Thats working,thanks M :P ichel