hessian {numDeriv} | R Documentation |
Calculate a numerical approximation to the Hessian matrix of a function at a parameter value.
hessian(func, x, method="Richardson", method.args=list(), ...) ## Default S3 method: hessian(func, x, method="Richardson", method.args=list(eps=1e-4, d=0.1, zero.tol=sqrt(.Machine$double.eps/7e-7), r=4, v=2), ...)
func |
a function for which the first (vector) argument is used as a parameter vector. |
x |
the parameter vector first argument to func. |
method |
one of |
method.args |
arguments passed to method. See |
... |
an additional arguments passed to |
The function hessian
calculates an numerical aproximation to
the n x n second derivative of a scalar real valued function with n-vector
argument. It uses genD
and extracts the second derivative.
An n by n matrix of the Hessian of the function calculated at the
point x
.