Data format for Bayesian Estimation (log-linear model)

Hi everyone,

I need some help in creating my dataset for the bayesian estimation.
I have my log-linearized model (by hand) with the steady-state values of all the variables all equals to zero (as log-deviations).
When I have to create my dataset for the bayesian estimation (using e.g. GDP and Consumption etc… Time Series) in which format I have to put my data in the dataset? As log-deviations from their mean or just as values (as time series is basically) ?

Thank you in advance for any advice,

There is an excellent guide written by Prof. Pfeifer that provides guidance for your question.

In case of a log-linear model you should detrend all potentially trending variables (e.g. GDP, Consumption, …). This could be achieved by using per capita variables (to remove the potential trend due to population growth) and applying the one-sided HP filter (see Stock&Watson, 1999) to the log-level of the per capita variables (remove the remaining technology trend). The outcome of the filtering process now has the interpretation of a percentage deviation from trend and has mean zero.
Because in this case the empirical concept matches with the theoretical model the observation equation becomes an identity.

For more information I highly recommend the above-mentioned guide.

Thank you for your clear answer Max1,

Looking at the Professor Pfeifer Guide I think the procedure should be the following (e.g. for GDP time series):

  1. I create my dataset GDP per capita time series
  2. Trasforming GDP per capita in Log
  3. Imposing my observable variable (e.g. y_obs=y) in model block
  4. Imposing HP filter option in stoch_simul? (In this case Dynare apply the filter just to the data or to the model as well?)

Then theoretically my data are comparable with my log-linearized model?

Sorry for my questions but It is one of the first time for me with Bayesian Estimation in Dynare

Thanks to everyone for any help,

No, the hp_filter-option of stoch_simul has nothing to do with estimation. You need to filter the data yourself to make it comparable. If you have read my guide closely, you should also note that the two-sided HP must not be used for estimation.

Dear Professor Pfeifer,

I really thank you for the explaination.
So I just need to filter my log per-capita data by myself and then importing the obtained dataset for the estimation. I will search better for my eventually doubts in the guide so.

Thank you all again for the help