Bayesian DSGE and trouble with data definition

Hi
I have a question. We are trying to estimate a DSGE with Dynare but we get some trouble with data definition and with predicted variables. We have written the model equations in non linear form. Then we ask Dynare to loglinearize the model. Our observable variables are detrended by Hp filter. Then we estimate the model but the predicted variables are not fluctuating around a zero mean. Why is this the case? Should we write the model in linear term dyrectly? We would avoid loglinearinzing the model by hand, this is time consuming and not efficient with respect to even small changes in the modelling strategy. Please, let me know
Thanks
Francesco

Hi Francesco,

If you declare a model with the non linear FOCs, use the option loglinear in the estimation command and call a datafile where the time series are demeaned (ie you do not use the option prefilter in the estimation command) then dynare adds the (logged) steady state of the observed endogenous variables in the measurement equation (because in this case dynare does not know that you are estimating the model with demeaned data). Before the estimation you should write:

Dynare will then understand that the constant is not needed in the steady state equation. Let me know if there is still a problem.

Best,
Stéphane.

Hi,

I tried to implement the trick proposed by Stéphane, but (I guess) since the demeaned data has negative values I received the next error message.

??? Error using ==> dynare_estimation_1 at 250
There are complex values in the data! Probably a wrong transformation

Is there another analogous trick to deal with the issue to not loglinearize the model by hand?

Thanks in advance

Jose P