Learn R Programming

QuasiSeq (version 1.0-11-0)

nlSolvers: 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, ...)

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.

Format

nlSolvers is currently a named list of length 8.

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.

Author

Long Qu

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.

See Also

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

Examples

Run this code
str(nlSolvers) ## list of existing solvers

Run the code above in your browser using DataLab