State space representation in Dynare

A short note on the state space representation in Dynare.
TechnicalMemo_State space representation of a model implemented in Dynare_IngvarStrid_170227.pdf (605 KB)

The proper way to do this would be to use the


See [State space form of DSGE)

I think, the way to retrieve an state space representation of Ingstr is very helpful for two reasons:

  1. You can retrieve an state space in the same order (position) of all endogenous variables declared after the var command.

  2. I think, the way proposed for Jpfeifer, about kalman_transition_matrix.m is applied to get an state state representation only for “state variables”, that is, “purely backward variables” and the “mixed variables” according to definition of Manual (pg. 47), but I suspect we will also need to include the another variables: “Purely forward variables” and “Static variables”.

Is there some idea to retrieve the “complete” state space using kalman_transition_matrix.m ? that is, for all variables?



What do you mean with all variables? The


can provide you with all four matrices used for state-space representations (the ABCD) as shown in

I mean:
“all variables”: purely backward variables, mixed variables, Purely forward variables and Static variables.

I make this distintion because I see the ABCD representation with kalman_transition_matrix.m is applied to get transition matrices only for varobs and state variables, that is, “purely backward variables” and the “mixed variables”.

what if I want my system expressed as:

x_t = A x_(t-1) + B w_t
y_t = C x_t + D w_t

instead of
x_(t+1) = A x_t + B w_(t+1)
y_(t+1) = C x_t + D w_(t+1)
as it is done in Fernandez-Villaverde et al. (2007) - “The ABCs (and Ds) of Understanding VARs”

The state equation is unaffected, but what about the observation equation?

Also in what order are variables organized (dr order or declaration order)? It seems to me that the variables are in dr order.

Finally, what if my model has less observables than structural shocks? ABCD_test displays a warning message “ABCD test only works for the square case with as many observables as structural shocks”. Is this a problem for the output produced by ABCD_test?

Without more context, it is impossible to tell. The two systems are equivalent, but moving from one to the other is usually tedious. What exactly do you want to achieve?`

Regarding ordering: to which object in Dynare does the question refer to?

Finally, the ABCD-test is concerned with VARs. In VARs there are always as many shocks as observables.