A wrapper function to return standard errors. Various numerical techniques are employed to obtain a positive-definite covariance matrix.
get_sdreport(obj, getReportCovariance = FALSE, silent = FALSE, ...)Object returned by RTMB::sdreport(). A correlation matrix is generated and stored in: get_sdreport(obj)$env$corr.fixed
The list returned by RTMB::MakeADFun()
Logical, passed to RTMB::sdreport()
Logical, whether to report progress to console. See details.
Other arguments to RTMB::sdreport() besides par.fixed, hessian.fixed, getReportCovariance
In marginal cases where the determinant of the Hessian matrix is less than 0.1, several steps are utilized to obtain a positive-definite covariance matrix, in the following order:
Invert hessian returned by h <- obj@he(obj$env.last.par.best) (skipped in models with random effects)
Invert hessian returned by h <- stats::optimHess(obj$env.last.par.best, obj$fn, obj$gr)
Invert hessian returned by h <- numDeriv::jacobian(obj$gr, obj$env.last.par.best)
Calculate covariance matrix from chol2inv(chol(h))