numDeriv (version 2012.3-1)

hessian: Calculate Hessian Matrix

Description

Calculate a numerical approximation to the Hessian matrix of a function at a parameter value.

Usage

hessian(func, x, method="Richardson", method.args=list(), ...)

## S3 method for class 'default': 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), ...)

Arguments

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. See grad. (Arguments not specified remain with their default values.)
...
an additional arguments passed to func. WARNING: None of these should have names matching other arguments of this function.

Value

  • An n by n matrix of the Hessian of the function calculated at the point x.

Details

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.

See Also

jacobian, grad, genD