Mode check plots look ok, but Hessian is still negative

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]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)[/code]

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

Best

Robert
mode_check_plots.zip (41.7 KB)

Your mode_check-plots indeed look good. What was the last optimizer you ran?

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.

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

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.

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

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.

1 Like

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

Best

Rob