Mode check plots look ok, but Hessian is still negative

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.

Mode check plots look ok, but Hessian is still negative

Postby Robert » Tue Jul 11, 2017 12:10 pm

Dear all,

This question is kind of related to an earlier post by phuong.macro. I'm currently trying to find the mode(s) of my model and this has been achieved by running different optimizers. If you take look at the mode check plots, they seem to be alright, however I still get the warning:

Code: Select all
POSTERIOR KERNEL OPTIMIZATION PROBLEM!
 (minus) the hessian matrix at the "mode" is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!
> In dynare_estimation_1 (line 316)
  In dynare_estimation (line 105)
  In rob30 (line 1073)
  In dynare (line 223)


What would be a good advice in this case? Most probably I am wrong with the interpretation of the graphs.

Best

Robert
Attachments
mode_check_plots.zip
(41.73 KiB) Downloaded 124 times
Robert
 
Posts: 36
Joined: Wed Jan 13, 2016 3:10 pm

Re: Mode check plots look ok, but Hessian is still negative

Postby jpfeifer » Wed Jul 12, 2017 11:40 am

Your mode_check-plots indeed look good. What was the last optimizer you ran?
------------
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: Mode check plots look ok, but Hessian is still negative

Postby StephaneAdjemian » Wed Jul 12, 2017 12:30 pm

Dear Robert,

It is important to understand that the mode_check plots are only necessary (not sufficient) conditions. So these plots may look nice even if the hessian has the wrong sign. If you are convinced that you have the mode, you may try to play with the size of the perturbation used to compute the hessian matrix by finite difference. There is no interface for that, you have to manipulate options_.gstep, a vector with two elements, before the estimation command. Look the top of the routine hessian.m to understand the respective roles of the elements of this vector.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Mode check plots look ok, but Hessian is still negative

Postby Robert » Wed Jul 12, 2017 2:07 pm

Dear Johannes,
Dear Stephane,

Thanks for helping me with this. In order find the mode, I first use mode_compute 6 and then the routine 7. Before I start playing around with options_.gstep, would you recommend to maybe run a different solver (e.g. 8, 9 or 10) and load the old mode_file of mode_compute 7?

Thanks again for getting back to me!

Robert
Robert
 
Posts: 36
Joined: Wed Jan 13, 2016 3:10 pm

Re: Mode check plots look ok, but Hessian is still negative

Postby StephaneAdjemian » Wed Jul 12, 2017 2:19 pm

Dear Robert,

Unless you are specifically interested in the posterior mode, You can simply run the MCMC after the call to mode_compute=6. It is not mandatory to use the posterior mode to define the initial conditions of the chains (we only want to start the chains from a point where the posterior density is not too small), and this optimization algorithm provides an estimate of the posterior covariance matrix needed for the jumping distribution.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Mode check plots look ok, but Hessian is still negative

Postby Robert » Wed Jul 12, 2017 3:22 pm

Dear Stephane,

Many thanks for your help and clearing that up. I always thought that under mode_compute = 6, we are also have to find the "proper" mode before we can start the MCMC. Sorry, I should have read the dynare manual again. The approach of mode_compute = 6 is different to the other optimisation routines. Thanks again Stephane!

Rob
Robert
 
Posts: 36
Joined: Wed Jan 13, 2016 3:10 pm

Re: Mode check plots look ok, but Hessian is still negative

Postby jpfeifer » Fri Jul 14, 2017 6:24 pm

You would always like to start at the mode and typically with the inverse Hessian as this will often be the most efficient, i.e. you will need fewer draws than under any alternative. But sometimes this is not feasible. We know from theory (e.g. Chib/Greenberg (1995)) that the MCMC will explore the whole posterior parameter space starting from any point (not just the mode) with any positive definite proposal covariance matrix (not just the inverse Hessian). The issue is that this is an asymptotic result and you may not have enough time to wait for the MCMC to move to its ergodic distribution and sample from it. The autocorrelation of draws may be high so that many draws will be needed. Thus, if possible, try to work with other optimizers. But in difficult cases, mode_compute=6 tends to be more forgiving than others, because of the way the covariance matrix for the proposal is constructed.
------------
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: Mode check plots look ok, but Hessian is still negative

Postby Robert » Tue Jul 18, 2017 12:47 pm

Thanks Johannes, I will first try to find the mode with Newton type optimisers before I go back to mode_compute = 6.

Best

Rob
Robert
 
Posts: 36
Joined: Wed Jan 13, 2016 3:10 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests