Skip to content
Prev 19967 / 20628 Next

Find Hessian in MixCat and glmmTMB packages

From ?npmlt,

## CVmat: the inverse of the observed information matrix of the model.
rcond(solve(a$CVmat))

   (this is the inverse condition number)


  For glmmTMB: the Hessian isn't stored in the object, here is one way 
to compute it:

hessian.glmmTMB <- function(fit) {
     obj <- fit$obj
     ee <- obj$env
     pp <- ee$last.par.best
     if (!is.null(r <- ee$random)) {
         pp <- pp[-r]
     }
     h <- numDeriv::jacobian(obj$gr, pp)
     return(h)
}
rcond(hessian.glmmTMB(m1))
On 2022-09-24 12:25 p.m., Sun, John wrote: