Brent.fmin(a = 0, b, fcn, tol = .Machine$double.eps^0.25, ...)
linesearch(b, fcn, grd, ftol = 0.0001, gtol = 0.9, ...)
step.maxsize(x, xlo, xup, pd, cap = 1)
fcn
.Brent.fmin
and linesearch
return a list containing:
linesearch
it is
a two-element vector where the second records the number of calls made to the
gradient.step.maxsize
returns a numeric containing the highest possible that is
compatible with the arguments passed to the function (direction vector and bounds).
fcn
and grd
should be defined see
the source code of maxlik.fd.scoring
and maxlik.td.scoring
.The default line search procedure used by the scoring algorithms is the
univariate optimization function optimize
from
package stats
.
The functions linesearch
and Brent.fmin
are used for debugging,
didactic and experimental purposes.
They provide useful information when testing
the scoring algorithm and allowed easy tune of some parameters of the line search
procedure. This kind of information and options are not available for example
in optim
from package stats.
Brent.fmin
is a version ported directly from the R sources
(procedure Brent_fmin
in file optimize.c).
linesearch
is based on Nocedal and Wright (2006) chapter 3
and Pollock (1999) Chapter 12. It can be used
to test the effect and role of the Wolfe conditions.
The function step.maxsize
is not a line search procedure.
Given the direction vector chosen by the scoring algorithm,
this function returns the upper end of the interval where the line search procedure
will search for the optimum step size. It ensures that for any step size inside the interval
from $0$ to the returned value the updated parameter values abide to the
lower and upper bounds.
This approach is also used by A. Clausen in his implementation of the
BFGS algorithm.
The use of this function is a simple alternative to reparameterizations of the model
and to the idea implemented in the L-BFGS-B algorithm in order to deal with this
kind of constraints.
Clausen, A. R code for the BFGS algorithm. http://economics.sas.upenn.edu/~clausen/computing/optim.php.
Nocedal, J. and Wright, J. W. (2006). Numerical Optimization. Springer-Verlag.
Pollock, D.S.G. (1999). A Handbook of Time-Series Analysis Signal Processing and Dynamics. Academic Press.
maxlik.fd.scoring
,
maxlik.td.scoring
.