zero_finder_nleqslv: Zero finder

Description Usage Arguments Value Examples

View source: R/zero_finder_nleqslv.R

Description

Finds zeros of multinomial functions using the nleqslv package

Usage

1
2
3
4
5
6
7
zero_finder_nleqslv(
  afun,
  veclength,
  tol = 0.4,
  x.start.vals = NULL,
  upper.lim = Inf
)

Arguments

afun

The function to find zeros

veclength

The dimension of the system of equations

tol

The range within which to set start values for the function to use to find zeros

x.start.vals

Optional user defined start values

upper.lim

to be used if there is to be an upper limit to the solution

Value

Predicted zeros of the given equation

Examples

1
2
3
4
5
6
7
8
afun <- function(x) {
	y <- numeric(2)
	y[1] <- x[1]^2 + x[2]^2 - 1
	y[2] <- exp(x[1]-1) + x[2]^3 - 1.1
	y
}

zero_finder_nleqslv(afun, veclength = 2)

genpwr documentation built on March 31, 2021, 1:06 a.m.