Reconstructing observation equations for estimation

I have a question about how to correct for Remark 13 in Pfeifer (2013):

“If the model variable y_{t} to which the observable y_{t}^{obs} is matched has mean zero, for example because it is a (log) deviation from the steady state, and you match it to a variable that does not have mean 0 without accounting for this, you will erroneously force the shocks to account for a positive mean in the observed series.”

I want to estimate a DSGE model with the following state space:

S_{t} = F*S_{t-1} + G*\varepsilon_{t} \\ obs_{t} = H_{0} + H_{1}*S_{t}

Because the model variables were redefined as log-deviations from steady state when entered in Dynare, variables generated directly from the DSGE solution are mean zero.

My question is: how can I add back this H_{0} term to the generated variables so they are no longer mean zero? I want to do this before the estimation step because H_{0} is a function of the underlying deep parameters which will be estimated. (Note: my data are not mean zero. They are treated to match obs_{t}.)

Thank you in advance!

Have a look at https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Smets_Wouters_2007/Smets_Wouters_2007_45.mod
There the main variables are all mean 0. But the “measurement equations” at the bottom of the model-block contain a constant that is estimated. Of course, you need to account for this in the steady_state_model-block.

1 Like

Thank you very much! Perfect example.