newton {micsr}R Documentation

Newton-Raphson method for numerical optimization

Description

The Newton-Raphson method use the gradient and the hessian of a function. For well behaved functions, it is extremely accurate.

Usage

newton(
  fun,
  coefs,
  trace = 0,
  direction = c("min", "max"),
  tol = sqrt(.Machine$double.eps),
  maxit = 500,
  ...
)

Arguments

fun

the function to optimize

coefs

a vector of starting values

trace

if positive or true, some information about the computation is printed

direction

either "min" or "max"

tol

the tolerance

maxit

maximum number of iterations

...

further arguments, passed to fun

Value

a numeric vector, the parameters at the optimum of the function.


[Package micsr version 0.1-1 Index]