fdHess {nlme} | R Documentation |
Evaluate an approximate Hessian and gradient of a scalar function using finite differences.
fdHess(pars, fun, ..., .relStep=(.Machine$double.eps)^(1/3), minAbsPar=0)
pars |
the numeric values of the parameters at which to evaluate the
function |
fun |
a function depending on the parameters |
... |
Optional additional arguments to |
.relStep |
The relative step size to use in the finite
differences. It defaults to the cube root of |
minAbsPar |
The minimum magnitude of a parameter value that is considered non-zero. It defaults to zero meaning that any non-zero value will be considered different from zero. |
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.
A list with components
mean |
the value of function |
gradient |
an approximate gradient |
Hessian |
a matrix whose upper triangle contains an approximate Hessian. |
Jose Pinheiro and Douglas Bates bates@stat.wisc.edu
fdHess(c(12.3, 2.34), function(x) x[1]*(1-exp(-0.4*x[2])))