nlSolve: Nonlinear equation solvers

nlSolversR Documentation

Nonlinear equation solvers

Description

nlsolve sequentially tries multiple nonliear equation solvers until a solution is found or all solvers have been tried.

Usage

nlSolvers

nlsolve(start, func, solvers = nlSolvers, control, ...)

Arguments

start

A numeric vector of starting values.

func

An objective function of which the zeros are sought.

solvers

A (named) list, with each element being itself a list with components named solve, success and result. See the solvers argument of glmsolve.

control

See the control argument of glmsolve.

...

Additional arguments.

Format

nlSolvers is currently a named list of length 8.

Details

Currently supported solvers are c('broyden', 'nleqslv.Broyden', 'nleqslv.Newton','fsolve','newtonsys','sane','dfsane','BBsolve'). They are respectively broyden in the pracma package, nleqslv in the nleqslv with method='Broyden' or with method='Newton', functions fsolve and newtonsys in the pracma package, and functions sane, dfsane, and BBsolve in the BB package.

Value

If at least one solver succeeds, a numeric vector of solutions will be returned, with attribute attr(*, 'nlsolve.metho') set to a string indicating the name of the success solver being used, and with attribute attr(*, 'nlsolve.success') being a logical scalar indicating whether any solver succeeded. When all solvers fail, the last one is returned, but with nlsolve.success being set to FALSE.

Author(s)

Long Qu

See Also

broyden, nleqslv, fsolve, newtonsys, sane, dfsane, BBsolve, glmsolve.

Examples

str(nlSolvers) ## list of existing solvers

QuasiSeq documentation built on Aug. 15, 2022, 5:07 p.m.

Related to nlSolve in QuasiSeq...