Usage: |
min = nmBHHH(func,x0,fder{,linmin,ftol,gtol,maxiter,nowarn}) or
min = nmBHHH(func,x0,fder{,opt})
|
Input: |
| func | string, name of the function to minimize, which returns
the negative log-likelihood value at some x.
The function should have just one
parameter x, which is a m x 1 vector
|
| x0 | m x 1 vector, the initial estimate of the minimum
|
| fder | string, name of the function for computing the negative gradient
of log-density function evaluated at all points; its output is a m x n matrix,
n being number of data points,
containing gradients of negative log-likelihood contributions of each data point
|
| opt | (optional) list containing all or some of the following
items: linmin, ftol, gtol, maxiter and nowarn as described below
|
| linmin | (optional) string, name of the routine for 1D (line)
minimization; default is linmin = "nmlinmin"
|
| ftol | (optional) scalar, reserved for future usage;
convergence tolerance of the function value,
default is ftol = 1e-7
|
| gtol | (optional) scalar, convergence tolerance of the value
of the function gradient;
default is gtol = 1e-9
|
| maxiter | (optional) scalar, maximal number of iterations;
default is maxiter = 250
|
| nowarn | (optional) scalar; by default, nowarn = 0.
If nowarn is set to a nonzero value, no warnings
will be shown and nowarn will be set to 1
for quantlets called by nmBHHH having this option
|
Output: |
| min.xmin | m x 1 vector, minimizer of func (isolated to a fractional precision of tol),
that is, the maximizer of log-likelihood function |
| min.fmin | scalar, minimal function value f(xmin) = -log L(xmin) |
| min.iter | scalar, number of performed iterations |
| min.hessin | m x m matrix, approximation of the inverted Hessian matrix
of the negative log-likelihood function at xmin;
the approximation is based on the sum of products
of negative log-density gradients |