Learn R Programming

micsr (version 0.1-4)

maximize: Maximization of a function

Description

This function provides a unified interface to three optimization algorithms: the BFGS algorithm provided by stats::optim, the Newton-Ralphson algorithm provided by stats::nlm and a simple Newton-Ralphson algorithm provided by micsr::newton

Usage

maximize(
  x,
  start,
  method = c("bfgs", "nr", "newton"),
  trace = 0,
  maxit = 100,
  ...
)

Value

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

Arguments

x

the function to maximize

start

a vector of starting values

method

the optimization method

trace

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

maxit

maximum number of iterations

...

further arguments, passed to the function