newton_method: The implementation of newton's method for root finding

Description Usage Arguments Value Examples

Description

mom_gamma function will calculate mom estimate for the shape parameter "k" and the scale parameter "theta" by using given sample.

Usage

1
2
newton_method(f, df, x_0, stop_criteria = .Machine$double.eps,
  max_iter = 10^3, left_b = -Inf, right_b = Inf)

Arguments

f

the function to be applied

df

the first derivative of f

x_0

the initial point of algorithm

stop_criteria

stopping rule

max_iter

if the iteration is larger than max_iter, loop will be stopped.

left_b

left bound of the solution search

right_b

right bound of the solution search

Value

the root of the function within the given bound

Examples

1
2
3
  x_cu <- function(x){x^3}
  x_sq <- function(x){3*x^2}
  newton_method(x_cu, x_sq, 3)

issactoast/r4issactoast documentation built on May 19, 2019, 8:22 a.m.