fixedPoint {saeRobust} | R Documentation |
Fixed Point Algorithm Infrastructure
Description
A fixed-point function supplied by the user is iteratively
evaluated. addAverageDamp
can be used to add average damping to the
function - this may have a positive effect on the speed of convergence.
Usage
fixedPoint(fun, x0, convCrit)
addAverageDamp(fun)
addConstraintMin(fun, value)
addConstraintMax(fun, value)
convCritAbsolute(tolerance = 1e-06)
convCritRelative(tolerance = 1e-06)
addMaxIter(fun, maxIter)
addCounter(fun)
addHistory(fun)
addStorage(fun)
newtonRaphson(funList, ...)
newtonRaphsonFunction(funList)
Arguments
fun |
the function to be evaluated in the algorithm |
x0 |
starting value |
convCrit |
a function returning a logical scalar. Is called with two arguments; the first is the value from iteration n; the second is the value from iteration n-1 |
value |
(numeric) |
tolerance |
a numeric value > 0 |
maxIter |
maximum number of iterations |
funList |
(list) the functions to be evaluated in the algorithm. First element is typically the score function, second is the derivative of the score. |
... |
arguments passed to |
Details
addAverageDamp
adds average damping to an arbitrary fixed point
function.
addConstraintMin
takes care that values are not below a
minimum value.
addConstraintMax
takes care that values are not larger than
maximum value.
convCritAbsolute
absolute difference as convergence criterion.
convCritRelative
relative (to previous iteration) absolute
difference as convergence criterion. If value is smaller than 1, absolute
difference is used.
addMaxIter
can be used to modify convergence criterion functions.
addCounter
can be used to count the number of calls of a function.
addHistory
can be used to save a history of results of a
function. The history is stored as a matrix, so this works best if the
return value of fun
is numeric.
addStorage
will add a storage to a function. The storage is a
list in which each result is stored. The function will coerce the return
value into a numeric.
newtonRaphson
finds zeroes of a function. The user can supply
the function and its first derivative. Note that the Newton Raphson
Algorithm is a special case of a fixed point algorithm thus it is
implemented using fixedPoint
and is only a convenience.
Examples
## Not run:
vignette("fixedPoint", "saeRobust")
## End(Not run)