MARSShessian.numerical: Hessian Matrix via Numerical Approximation
Description
Calculates the Hessian of the log-likelihood function at the MLEs using either the fdHess function in the nlme package or the optim function. This is a utility function in the MARSS-package and is not exported. Use MARSShessian to access.
The numerically estimated Hessian of the log-likelihood function at the maximum likelihood estimates.
Arguments
MLEobj
An object of class marssMLE.
This object must have a $par element containing MLE parameter estimates from e.g. MARSSkem.
fun
The function to use for computing the Hessian. Options are 'fdHess' or 'optim'.
Author
Eli Holmes, NOAA, Seattle, USA.
Details
Method fdHess uses fdHess from package nlme to numerically estimate the Hessian matrix (the matrix of partial 2nd derivatives) of the negative log-likelihood function with respect to the parameters. Method optim uses optim with hessian=TRUE and list(maxit=0) to ensure that the Hessian is computed at the values in the par element of the MLE object.