TheoMichelot / hmmTMB

Fit hidden Markov models using Template Model Builder (TMB): flexible state-dependent distributions, transition probability structures, random effects, and smoothing splines.
53 stars 7 forks source link

Non-symmetric Hessian #6

Closed TheoMichelot closed 3 years ago

TheoMichelot commented 3 years ago

I've been getting the following warning when running HMM$fit, even for simple models where I wouldn't expect convergence issues:

Warning messages:
1: In optimx.run(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower,  :
  Hessian is reported non-symmetric with asymmetry ratio 3.73470853123001e-10
2: Hessian forced symmetric 

For a reproducible example, see e.g. the driver.R script in inst/.

r-glennie commented 3 years ago

Fixed by specifying control arg to optimx as default to disable kkt tests.