Final log data density is -inf and problem with the modified harmonic mean estimator

Dear all,

Hello. I’m doing Bayesian estimation of NK model and it has 16 sectors.
The problem is that final log data density is -inf, and there’s a message “There’s probably a problem with the modified harmonic mean estimator.” Also my mode check plots say they does not find the proper mode.

I have been searched the forum with the similar problems, but I failed to fix mine.
My data include aggregate (real) Y, sectoral inflation, and productivity of each sector.
The model has one aggregate and two series of sectoral shocks, so that the number of observations and shocks are equal.
Also I checked model_diagnostic, which tells me I have no problem.

I also checked the observation equations.
I used sectoral inflation data as ln(p_k,t) - ln(p_k,t-1), where k denotes sector-k, and I demeaned it. For aggregate Y (I use real PCE) and sectoral productivity A, I detrend with one-sided HP filter of ln(real Y) and ln(A). So I think my observation equations are fine with the scaling issue.
(I also tried detrending the linear trend, but I got the same problems)

I attached all my data and .mod files. (also the log file of the estimation)
Could someone please help me to solve the problem and improve my estimation?
Thank you in advance.
question_dynare.zip (53.0 KB)

Hello. Before someone replied my question, I got some progress so I just want to ask further questions.

With different mode finder (mode_compute=5) I got decent final log density which I couldn’t get with mode_compute=6. I also deleted the bounds for the prior of standard deviation and used prior_trunc=0 option.
I attached my data, .mod, estimation log file, and the resulting mode_check and diagnostics plots.

My concerns are now that in the mode plot the mode of the standard deviations are in the flat part of the density and my convergence diagnostics graphs are not converging.

So my questions are (mode plots and univariate diagnostics are in ‘Modeplots_udiags.pdf’ file) :

  1. Please check my mode_check plots of SE_vmu and SE_va from 1 to 16. Is there a problem with these mode plots as they are mostly flat?
  2. My whole draw are 80,000 now. I know adding more draws could improve my diagnostics result, but is it guaranteed that it will converge at a certain point?

One more question related to the estimation process:
3. Is the posterior mode shown from the mode_check plot a ‘starting’ value? My understanding is that Dynare computes the likelihood, find mode and compute the Hessian at that mode, for every draw. If this is true, we check the mode_check plot to make sure that we start from the good value?

Thank you in advance for your help!
Modeplots_udiags.pdf (476.3 KB)

  1. The mode_check-plots look rather good. They are not really flat. There is substantial curvature (just look at the y-axis scaling).
  2. The univariate diagnostics are hard to judge. Usually, I would start with 500,000 draws and then check the trace plots.
  3. No, you compute the mode once and employ it to tailor the proposal density of the MCMC.

Professor, I really appreciate with your help.
I would do more draws and think more about the process that I misunderstood.
Thank you!!