bisection: Univariate Optimization

View source: R/bisection.R

bisectionR Documentation

Univariate Optimization

Description

Univariate optimization.

Usage

bisection(f, interval, tol = 1e-08, hessian = FALSE, ...)

Arguments

f

a function to minimize, by varying the first argument.

interval

a vector containing the lower and upper limits of the interval to search over.

tol

the max difference between the optimal x and returned x.

hessian

whether to return the Hessian matrix, standard error, and 95% confidence interval.

...

passed to the f function.

Value

List containing x (optimal value), f (function value), and n (number of function evaluations).

Note

The number of function evaluations (n) is two times the number of loops performed.


arnima-github/arni documentation built on Oct. 28, 2023, 6:18 p.m.