I am not sure how dynare cast model into state space representation. My feeling is that dynare simply take the solution of DSGE model as the state transition equations in state space representation. Since all variables in DSGE are theoretical ones, they are all treated as unobservables. The measurement equations we further define indicate how theoretical variables (unobservables) link to their observations. But in this way, the number of state variable in state space representation tend to be large hence Kalman filter becomes less efficient.
Am I correct?

What do you mean? The solution for the model tells you how the states evolve over time. The observation equation tells you how the observables are related to the states. During estimation, Dynare links the observables to the states. The model needs to be solved in any case for the states. A state is always part of the state transition equation. Why do you think that Dynare uses a state-space that is larger than necessary?

Sorry for the confusion and thank you for your reply.

Could we first clarify that whenever we talk about state variables in dynare, it means the unobservables in state space representation and it does not means predetermained variables (so, not the state variables versus control variables).

when I said dynare have more state variables I mean the following. For example, output is observable. Dynare will have a unobservable version of output (state variable) defined in the model and an observable version of output and this two output are linked by measurement equation. But I think usually the unobservable version of output is not necessary, like a intermediate variable. Although dynare’s way make it easier to write an state space representation, it contain the extra unobservable version of output.

What you describe is not a state. An unobservable is not necessarily a state and that’s why your terminology is confusing. What is relevant are the predetermined variables, i.e. true states. Their evolution will completely describe the movement of all variables, observed or unobserved. When you define an observation equation mapping observed output into the corresponding model variables, Dynare will implicitly replace the model variables by their function of states. Thereby, redundant static variables are eliminated.

Thank you, it is much clear now. A further equations. when dynare maps observations to the state variables, is it the state variables(t-1)? But in state space representation, the observation equation link observation(t) to unobservables(t). To do that, I think we need to use policy function which link control(t) to state(t). However dynare does not distinguish between policy function and low of motion but uses a overall solution link state(t-1) to all endogenous(t)

This is a follow-up question after reading ‘A Guide to Specifying Observation Equations for the
Estimation of DSGE Models’.

So under state-space representation, we have

observed variables (a subset of control variables that are observed).

unobserved state variables

unobserved control variables (a subset of control variables that are not observed)

But there are just two variables in state-space representation x(state variables) and y (observed variables). Which one (x or y) captures unobservables that are not states and also not observed? Many thanks!!

You need to distinguish conceptually between the state space system for the Kalman filtering and the one representing the model solution. For the Kalman filtering, you do not care about control variables that are not observed. There, you would simply drop them. In terms of the model solution, they belong to y. The rule is: everything that is not a state is a control.