nlminb
Optimization using PORT routines
Unconstrained and boxconstrained optimization using PORT routines. For historical compatibility.
 Keywords
 optimize
Usage
nlminb(start, objective, gradient = NULL, hessian = NULL, …,
scale = 1, control = list(), lower = Inf, upper = Inf)
Arguments
 start
 numeric vector, initial values for the parameters to be optimized.
 objective

Function to be minimized. Must return a scalar value. The first
argument to
objective
is the vector of parameters to be optimized, whose initial values are supplied throughstart
. Further arguments (fixed during the course of the optimization) toobjective
may be specified as well (see…
).  gradient

Optional function that takes the same arguments as
objective
and evaluates the gradient ofobjective
at its first argument. Must return a vector as long asstart
.  hessian

Optional function that takes the same arguments as
objective
and evaluates the hessian ofobjective
at its first argument. Must return a square matrix of orderlength(start)
. Only the lower triangle is used.  …
 Further arguments to be supplied to
objective
.  scale
 See PORT documentation (or leave alone).
 control
 A list of control parameters. See below for details.
 lower, upper

vectors of lower and upper bounds, replicated to be as long as
start
. If unspecified, all parameters are assumed to be unconstrained.
Details
Any names of start
are passed on to objective
and where
applicable, gradient
and hessian
. The parameter vector
will be coerced to double.
The parameter vector passed to objective
, gradient
and
hessian
had special semantics prior to R 3.1.0 and was shared
between calls. The functions should not copy it. If any of the functions returns NA
or NaN
the internal code
could infiniteloop in R prior to 2.15.2: this is now an error for
the gradient and Hessian, and such values for function evaluation are
replaced by +Inf
with a warning.
Value
A list with components:
objective
corresponding to par
.0
indicates successful
convergence.
NULL
. For details, see PORT documentation.
Control parameters
Possible names in the control
list and their default values
are:
eval.max
 Maximum number of evaluations of the objective function allowed. Defaults to 200. % MXFCAL
iter.max
 Maximum number of iterations allowed. Defaults to 150. % MXITER
trace
 The value of the objective function and the parameters is printed every trace'th iteration. Defaults to 0 which indicates no trace information is to be printed.
abs.tol
 Absolute tolerance. Defaults
to 0 so the absolute convergence test is not used. If the objective
function is known to be nonnegative, the previous default of
1e20
would be more appropriate. % AFCTOL 31
rel.tol
 Relative tolerance. Defaults to
1e10
. % RFCTOL 32
x.tol
 X tolerance. Defaults to
1.5e8
. % XCTOL 33
xf.tol
 false convergence tolerance. Defaults to
2.2e14
. % XFTOL 34
step.min, step.max
 Minimum and maximum step size. Both
default to
1.
. % LMAX0 35 / LMAXS 36
 sing.tol
 singular convergence tolerance; defaults to
rel.tol
. % SCTOL 37
 scale.init
 ... % DINIT 38
 diff.g
 an estimated bound on the relative error in the objective function value. % ETA0 42
References
David M. Gay (1990), Usage summary for selected optimization routines. Computing Science Technical Report 153, AT&T Bell Laboratories, Murray Hill.
See Also
optim
(which is preferred) and nlm
. optimize
for onedimensional minimization and
constrOptim
for constrained optimization.