Hessian at parameter bounds

Hi All,

This post is, in some sense, a follow-up to one from a while back:

What was going on was that we had a file that was estimating in dynare 4.6.4 but not in any newer version of dynare, and we were struggling to understand why. Johannes kindly suggested that the optimizer in 4.6.4 may have been taking smaller steps and avoiding the parameter bounds, while version 5.0+ was, in effect, crashing into them. So, we adjusted the bound using the prior_trunc = 0 “trick” and all was good (for a while :slight_smile: ).

More broadly, however, this seems to be an example of a problem we’re getting more frequently. As in, dynare 4.6.4 will report a Hessian and run MCMC in situations in which newer versions of dynare (including 6.2) won’t. We’ve been relying on 4.6.4 for a long time and are now wondering what to make of those results, and specifically whether the legacy Hessian / estimation results are reliable.

I think I’ve managed to create the simplest possible example, which illustrates the issue (see also MWE.mod and data file attached below). In short, this mod file crashes in dynare 6.2 but generates estimates in dynare 4.6.4. Are these estimates any good? If they are, why are dynare versions 5.0+ not reporting them? I’m guessing something changed in the way the Hessian was computed, so I’m trying to figure out whether there are any circumstances in which the legacy method would produce correct results (for what it’s worth the mode estimates in 4.6.4 and 6.2 appear to be super close).

Any reactions / suggestions would be very much appreciated.

Thanks in advance!
paw
MWE.mod (993 Bytes)
MWE_data.csv (2.0 KB)

What you are having here is a very particular issue in the MWE. The mode is right at the specified prior bound, leading to a discontinuity. The Hessian at this point is clearly not positive definite. The reason that still worked in Dynrae 4.6.4 is the prior bound being ignored during the Hessian computation for mode_compute=1.

Thanks a lot for this, Johannes - and very good to know why 4.6.4 was “better” at giving us (wrong) answers… Sounds like we’ll need to check some of the old results and, going forward, we really should do a better job of upgrading dynare faster.

Thank you so much!
paw

Upgrading faster is often a good idea. That being said, any positive definite proposal density covariance matrix will work asymptotically. The results may hence not be wrong, convergence may just be slower.

Thanks a lot for flagging this, Johannes. And, in that case, I wonder whether 4.6.4 may not actually be better… In the sense that even though it’s not using the correct Hessian, it should actually generate an asymptotically valid result, whereas later versions will just cry Hessian problem and stop there…

Obviously, first-best would be to avoid crashing into the bounds (either by changing the initial condition or relaxing them) but for large models that may not be so easy to achieve… So, as long as there would be some warning to be extra vigilant about convergence (as well as the mode estimate, I guess), perhaps that could be second-best? And it would probably mitigate the number of cases / posts where people run into the negative-semi definite error…

There may well be good reasons not to do that, naturally, so zero pressure :slight_smile:

Many thanks again!
paw