Hello.

I am trying to estimate a DSGE developed in "*Bayesian Estimation of an Open Economy DSGE Model with Incomplete Pass-Through* 2005 by Malin Adolfson, Stefan Laseén, Jesper Lindé and Mattias Villani, Sveriges Riksbank Working Paper Series 179. After reading a lot through this forum, I still can’t understand how to specify measurement equations. In the paper they have a stochastic unit root trend induced by technology. I have my model stationarized and log liniarized. But as I saw, writing measurement equations is data specific process. Can anyone tell me please general rules in writing measurement equations? I would like to work with raw data, how to ralate raw data to log-liniarized equations? In the paper they offer some formulas for writing measurement equations, but I don’t know how to bring this formulas to dynare.

Hi, you should follow the advice in bottom half of the following post:

[Simple model. Unkown error!)

which shows how to match models written in stationary log deviations form to their empirical correlate.

I would prefer not to demean first difference of logs…

In my model unstationary variables are stationarized like this:

- If it is a nominal variable divide by Price and technology

2 if it is a real variable divide by technology

Is it correct if I consider for example obs_GDP in delta logs (log(GDP)-log(GDP(-1))) as input (without demeaning) and specify measurement equation as

where y_hat is log liniarized deviation of GDP from steady state.

If tnd_technology is the trend growth rate of technology in steady state around which you log-linearize, you are correct.

Demeaning of the first difference of logs just means that you do not have to worry about this component as you subtracted it from the data (and it hence does not appear in the measurement equation either). Note also that it is not advocated to mechanically demean the data. Assume for example that Y grows with the technology rate X_t. If you calibrate your model by using X_t as the growth rate of technology, all variables growing with technology should be demeaned by subtracting X_t from the log differences. It would be incorrect to set the mean of C to 0 by subtracting its own data mean, because then you would impose that C and Y grow with different rates in steady state.

Your way of including the steady state growth rate as a constant in the equation essentially does the same trick.

Thank you!

My question refers to:

I think that instead of

`obs_GDP=(y_hat-y_hat(-1))+tnd_technology+measurement_error`

should be:

obs_GDP=(y_hat-y_hat(-1))+tnd_technology_ss + tnd_technology_hat + measurement_error

where tnd_technology_ss is the trend growth rate of technology in steady state and tnd_technology_hat is the log liniarized deviation of trend growth rate of technology from steady state.

Is that correct?

ALLVtechnicalAppendix.pdf (452 KB)

ALLVtechnicalAppendix.pdf (452 KB)

I have faced the same problem like you. I hope these two papers will help you.

ALLV1TechnAppx.pdf (300 KB)

Please see Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf.

The first example assumed a linear deterministic trend. You are after a stochastic trend. That case is also described in the Guide.