statsmodels/statsmodels — comment on commit 17540867ef660d39bc19e15526adcf342ff2c44b
File:  line 0
By josef-pkt:

Is the odd behavior of the solvers on the convergence to the correct parameters, or just for the cov_params/bse at the final result. Did you try the other Hessian calculators, approx_hess uses only forward steps (it should be faster but less accurate).

Looking at the numdiff source, approx_hess3 should be more accurate (forward and backward step), and approx_hess_cs is also two-sided, approx_hess_cs2 looks interesting, but I don't remember it.

Bierens mentioned that the reparameterization (I guess it's Olson) makes it globally convex, so I think it's a good idea to keep it.

Another thought, since you have the loglike and, I think, also score per observation before np.sum, so it would also be possible to use the outerproduct of the Jacobian for the Hessian approximation in the optimization (essentially BHHH). (I just added loglikeobs to the models in discrete by copy-paste)