Learn R Programming

nlme (version 3.1-78)

fdHess: Finite difference Hessian

Description

Evaluate an approximate Hessian and gradient of a scalar function using finite differences.

Usage

fdHess(pars, fun, ..., .relStep=(.Machine$double.eps)^(1/3), minAbsPar=0)

Arguments

Value

A list with componentsmeanthe value of function fun evaluated at the parameter values parsgradientan approximate gradientHessiana matrix whose upper triangle containst an approximate Hessian.

Details

This function uses a second-order response surface design known as a Koschal design to determine the parameter values at which the function is evaluated.

Examples

Run this code
fdHess(c(12.3, 2.34), function(x) x[1]*(1-exp(-0.4*x[2])))

Run the code above in your browser using DataLab