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
maximize(
x,
start,
method = c("bfgs", "nr", "newton"),
trace = 0,
maxit = 100,
...
)a numeric vector, the parameters at the optimum of the function.
the function to maximize
a vector of starting values
the optimization method
if positive or true, some information about the computation is printed
maximum number of iterations
further arguments, passed to the function