Log data density is Inf

Hi to everybody.

I am estimating a DSGE Model using Bayesian techniques. I have the next warning error:


Log data density is Inf.

==== Identification analysis ====

Testing prior mean
Evaluating simulated moment uncertainty … please wait
Doing 171 replicas of length 300 periods.
Simulated moment uncertainty … done!

All parameters are identified in the model (rank of H).

The rank of J (moments) is deficient!

==== Identification analysis completed ====

Does anybody can give me some guidance? Any kind of help will be highly appreciated.
da.m (3.65 KB)
newmodel.mod (3.77 KB)

Brute forcing Dynare to run the MCMC is not going to help. Looking at the

plots, the point where you start the MCMC is not the mode. The subsequent MCMC has 0 acceptance rate. Try mode_compute=9.

Are you sure that you are handling parameter dependencies correctly? Are y_hstar and y_cstar really independent parameters?

Dear Pfeifer,
Thank you very much for your kind help, I have tried mode_compute=9, but the result is still the same. In my model, the y_hstar and y_cstar are the steady-state value of the variable, I set them as local variable inside the model block, but that does not solve my problem.

But why are your model local variables not functions of the underlying structural parameters? Also, how do the mode_check plots look like?

Dear Pfeifer,
Thank you for your patience. Because there are some equation is the addition form, for example y=y_c+y_h, so after linearization it is y_hat=y_cstary_c_hat+y_hstary_h_hat.
Where y_cstar or y_hstar is the steady-state value that need to be calibrated, and they are exogenous variables of the model. After running mode_compute=9, the mode_check plots are as follows.
Mode check3.pdf (5.65 KB)
Mode check 2.pdf (6.73 KB)
Mode check 1.pdf (6.25 KB)

Your mode_check plots do not look good at all. You might want to recheck your model and run a sequence of mode finders by reloading the mode-file and restarting mode-finding with a different mode-finder.

I was just puzzled that you can simply calibrate all the parameters to fixed values. I only know models where you cannot fix them easily, but where they are rather functions of the deep parameters (I am not only referring to the y_ but also the other ones)

Dear Pfeifer,
Thank you for your help again. I am a new learner of the Dynare, so I am sorry that I do not know how to run mode finders. And I also want to know how to modify my model.
Change the prior distribution of variables, modify the observation equation or data processing methods, or even modify the model equations?

When Dynare runs a mode_finder (mode_compute=4 by default), the detected mode is saved in a file named NAME_Of_MOD_FILE_mode.mat (where NAME_Of_MOD_FILE is the name you gave your file). After a previous mode-finding, you can load this mode file with the

option, set

to a different option and restart mode finding. Dynare will then start from the previously detected mode and continue to search.

Dear Pfeifer,
Thanks for your suggestion. I have already try to run a sequence of mode finders, but the mode_check plots do not improve. I also want to know how to find the problem according to the mode_check plots. I have already read your "An introduction to graphs in Dynare’’, but I can not get the answer.

And I have another problem. Why remove the code “mcmc_jumping_covariance=identity_matrix”, it has the following error message. I think there must be some errors in my code.
??? Error using ==> chol
Matrix must be positive definite.

And when I run the identification analysis on my model it just tells me the following message, however, it does not tell me what can not be identified by J moments.
The rank of J (moments) is deficient!

Thank you very much again.
da.m (3.65 KB)
model.mod (3.88 KB)