Problems with Bayesian Estimation?

Dear Professor Pfeifer,

First of all, thank you for reading this post !

I set up a DSGE model (as attached) based on LWZ(2013) “LAND-PRICE DYNAMICS AND MACROECONOMIC FLUCTUATIONS” , but I have ran into some problems when doing the Bayesian Estimation. Would you please give some advice ?

  1. When I ran the code it says “Initial value of the log posterior (or likelihood): -1754714.7789”. Is this a very small value ( very large absolute value ) and imply that I have some mistakes in the code ?

  2. I set the prior mean of shocks’ standard error to 0.1. But I also read that this prior mean is set to 0.01 or 0.001 in some papers. Is this value determined subjectively ?
    (When I tried setting to 0.01, the absolute “Initial value of the log posterior (or likelihood)” become even larger.)

  3. When I compare the moments of the model and actual data, I found that the std of model is much larger that the data. Is there anything wrong with the code or the data ?

(All the data series are dealed with log difference and demeaned except inflation which is just demeaned)

  1. If Ii want to add a measurement error as structure shock i.e. e_y_ME, does it mean that I have to add one more observation as the number of observations should be equal to that of shocks ?

Thanks again for your time!
Best regards

HM.mod (7.6 KB) HM_data.m (4.7 KB) HM_steadystate.m (4.0 KB)

  1. I am mostly worried about the almost monotonically increasing upwards trend in inflation. Something must be wrong here. Did you take the price level instead of inflation?
  2. A sensible number here depends on the scaling of your data, i.e. if you scaled by 100. But generally, the value is subjective.
  3. Please check 1.
  4. The number of shocks is allowed to be bigger than the number of observables. Only make sure that all parameters are still identified.

Dear Professor Pfeifer,

Thank you for your reply!

  1. I think that’s exactly the case. However, the problem still exists after I have changed the data of inflation. ( updated files are attached )

  2. I’m sorry that I do not quite understand what is the “scaling of your data”. For the data with trend, I typically use log difference of data and demean them. For the data in percent form e.g. interest rate like 4%, I use ln(1+4%/4) and demean them. Is this related to the case of “scaled by 100” ?

    And also, I see in some papers that the authors estimate the standard error of 100*sigma (sigma means std of shock ) instead of sigma. How to interpret this ?

  3. The problem also still exists after I changed the data of inflation.

Thank you for your time on reading this! I really appreciate your kindness.
Best regards

HM.mod (7.6 KB) HM_data.m (4.7 KB) HM_steadystate.m (4.0 KB)

Dear Professor Pfeifer,

Sorry to bother again. I’m not sure if you have seen this post.
Really looking foreward to your reply ! Thank you for your time!

Best regards

I don’t really know what is going on in your case. Try to simplify the model or estimation. Regarding your questions:
2. You can measure 1 percent as 0.01 or as 1 in the data (in which case you multiplied everything by 100). In your example ln(1+4%/4) is roughly 0.01, so it is not multiplied by 100. In that case, your prior should assign the most weight to shock sizes around 0.01 and not 1. See the prior plots.