genD
genD
Description
Generate a matrix of function derivative information.
Usage
genD(func, x, d=0.01, eps=1e-4, r=6)
genD.c(func, x, d=0.01, eps=1e-4, r=6)
genD.TSestModel(estModel, d=0.01, eps=1e-4, r=6)
Required Arguments
- func, model
-
An S function or an object of class TSestModel. func must have a single
vector argument, in which case the second argument,x, is the parameter
vector.
Optional Arguments
- d
-
The fraction of x to use for the initial numerical approximation.
- eps
-
Used instead of d for elements of x which are zero.
- r
-
The number of Richardson improvement iterations.
Value
A list with three elements as follows:
$D is a matrix of first(gradients) and second order partial
derivatives organized in the same manner as Bates and
Watts. (The first p columns are the gradients and the
next p(p-1)/2 columns are the lower triangle of the Hessian).
$p is the dimension of the parameter space=dim of the tangent space.
$f0 is the function value at the point where the matrix D
was calculated.
Details
The derivatives are calculated numerically using Richardson improvement.
See Also
Examples
return to Table of Contents