R: Solve systems of equations using the Gauss-Newton algorithm
NRnum
R Documentation
Solve systems of equations using the Gauss-Newton algorithm
Description
Solves systems of functions of form f_1(x) = 0, f_2(x) = 0,... for vector x using the Gauss-Newton algorithm
(the multidimensional version of the Newton-Raphson algorithm). The gradients
are solved numerically within the function using R-function numericDeriv.
Usage
NRnum(init, fnlist, crit = 6, ...)
Arguments
init
A vector of initial values for x.
fnlist
a list of R-functions for f_1(x), f_2(x), ... the functions get a vector-valued argument x and return a scalar value.
crit
The maximum accepted value of the convergence criteria. The applied criteria is the sum of absolute function values at the solution (|f_1(x)|+|f_2(x)+...|)
...
Other arguments passed to the functions of fnlist
Value
A list of components
par
the value of vector x in the solution
crit
the value of the convergence criterion at the solution
If estimation fails (no solution is found during 100 iterations), both elements of the solution are NA's.