chjackson/flexsurv

Hessian control `tol.evalue` ignored

Closed this issue · 0 comments

In 7bce70f the use of an approximate covariance (nearest positive-definite) was intended whenever negative eigenvalues were sufficiently small (in either the Hessian or similarly its inverse); however there is a short-circuit test that discards the hessian prior to the approximation method:

if (hessian && all(is.finite(opt$hessian)) && all(eigen(opt$hessian)$values > 0))

This is a tricky case to test, so I'm not surprised that it wasn't picked up when implemented.