Approximate the diagonal of the hessian by finite differences

The function is used to build a crude approximation to VCOV.

dMod_approxHessian(objfn, pars, h = 1e-04, diag = TRUE, ...)

Arguments

objfn

dMod objective function

pars

named parameter vector

h

stepsize of finite steps

diag

compute only diagonal. Must be TRUE. The case diag = FALSE might be implemented in the future.

...

other arguments being passed to the objective function

Value

Hessian matrix