Log data density is Inf

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Log data density is Inf

Postby Mike » Mon May 16, 2016 12:36 am

Hi to everybody.

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

ESTIMATION RESULTS

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).

WARNING !!!
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.
Attachments
da.m
(3.65 KiB) Downloaded 149 times
newmodel.mod
(3.77 KiB) Downloaded 132 times
Mike
 
Posts: 9
Joined: Sun May 15, 2016 5:13 pm

Re: Log data density is Inf

Postby jpfeifer » Tue May 17, 2016 6:23 pm

Brute forcing Dynare to run the MCMC is not going to help. Looking at the
Code: Select all
mode_check

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?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Log data density is Inf

Postby Mike » Wed May 18, 2016 8:07 am

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.
Mike
 
Posts: 9
Joined: Sun May 15, 2016 5:13 pm

Re: Log data density is Inf

Postby jpfeifer » Wed May 18, 2016 10:14 am

But why are your model local variables not functions of the underlying structural parameters? Also, how do the mode_check plots look like?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Log data density is Inf

Postby Mike » Wed May 18, 2016 1:40 pm

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_cstar*y_c_hat+y_hstar*y_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.
Attachments
Mode check3.pdf
(5.65 KiB) Downloaded 175 times
Mode check 2.pdf
(6.73 KiB) Downloaded 155 times
Mode check 1.pdf
(6.25 KiB) Downloaded 158 times
Mike
 
Posts: 9
Joined: Sun May 15, 2016 5:13 pm

Re: Log data density is Inf

Postby jpfeifer » Wed May 18, 2016 6:05 pm

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)
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Log data density is Inf

Postby Mike » Thu May 19, 2016 2:22 am

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?
Mike
 
Posts: 9
Joined: Sun May 15, 2016 5:13 pm

Re: Log data density is Inf

Postby jpfeifer » Sat May 28, 2016 6:21 am

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
Code: Select all
mode_file=NAME_Of_MOD_FILE_mode.mat

option, set
Code: Select all
mode_compute

to a different option and restart mode finding. Dynare will then start from the previously detected mode and continue to search.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Log data density is Inf

Postby Mike » Mon May 30, 2016 1:27 pm

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.
WARNING !!!
The rank of J (moments) is deficient!

Thank you very much again.
Attachments
da.m
(3.65 KiB) Downloaded 131 times
model.mod
(3.88 KiB) Downloaded 173 times
Mike
 
Posts: 9
Joined: Sun May 15, 2016 5:13 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests