newtonraphson_show: A function of the Newton-Raphson algorithm, plotting the...

Description Usage Arguments Value References See Also

View source: R/newtonraphson_show.R

Description

Applies the Newton-Raphson algorithm to find x such that ftn(x)[1] == 0, and plots the trace of the estimate.

Usage

1
newtonraphson_show(ftn, x0, xmin = x0 - 1, xmax = x0 + 1)

Arguments

ftn

the function.

x0

the initial guess of the fixed point.

xmin

lower limit for plotting.

xmax

upper limit for plotting.

Value

Returns the value of x at which ftn(x)[1] == 0. If the function fails to converge within max.iter iterations, returns NULL.

References

Jones, O.D., R. Maillardet, and A.P. Robinson. 2009. An Introduction to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC.

See Also

newtonraphson


spuRs documentation built on May 2, 2019, 12:44 p.m.