| 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, 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 "Richardson" or "simple" indicating
the method to use for the aproximation. |
method.args |
arguments passed to method. (Arguments not specified remain with their default values.) |
... |
an additional arguments passed to func. |
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.