The function is a wrapper around several methods for calculating the numerical Hessian matrix. The function is meant for internal use and is not exported.

hessian(type, log_lik, param_free, method, optimizer)

Arguments

type

A character string giving the method to use when approximating the Hessian. One of: "numderiv" or "maxlik".

log_lik

A log-likelihood expression prepared by prepare_log_lik

param_free

A list of freely estimated parameters

method

A method for the approximation of the Hessian. Only necessary for the maxlik package

optimizer

A character string giving the optimizer used