.BG M
.VE $Header: /usr3/s/current/s/data/.help/RCS/fmin,v 1.2 83/12/30 23:08:42 rab Exp $
.FN fmin
.TL
?fmin: Macro to minimize an S expression
.CS
?fmin(pars, f, g, start, radius, partol, gtol, iter, compute=)
.PP
.AG pars
Name of the S dataset to be used for the parameters in the function to be
minimized.
.AG f
S expression whose value is the function of `pars' to be minimized.
.AG g
S expression whose value is the derivative of `feval' with respect to `pars'.
.AG start
Vector of starting values for `pars'
.AG radius
Optional, starting value for the radius of trust in the optimization algorithm.
Default is 1.0.
.AG partol
Optional, value such that a relative change in `pars' smaller than `partol' implies
convergence of the iteration.
Default is 1e\-3.
.AG gtol
Optional, value such that gradient norm less than `gtol' implies convergence.
Default is 1e\-3.
.AG iter
Optional, maximum number of iterations allowed.
Default is 200.
.AG compute=
Optional, preliminary expression to be computed to simplify computation of
function values.
.RT
A structure describing the function at the computed minimum.
.RC pars
The vector of parameters at the minimum.
NOTE: the actual name of this component will be the name supplied as the
first argument to `fmin'.
.RC value
The value of the function at the minimum.
.RC gradient
The value of the gradient at the minimum.
.RC variance
The estimate of the variance of the parameter estimates (namely, the
inverse of the approximate Hessian).
.RC halt
The reason for halting.
.RC nf
The number of function evaluations in the iteration.
.RC ng
The number of gradient evaluations in the iteration.
.EX
?fmin(a,a^2,a*2,4)  #min of y=x^2 starting at 4
.KW algebra
.WR
