Learn R Programming

nimble (version 0.6-6)

nimOptim: Nimble wrapper around R's builtin optim.

Description

Nimble wrapper around R's builtin optim.

Usage

nimOptim(par, fn, gr = "NULL", ..., method = "Nelder-Mead", lower = -Inf,
  upper = Inf, control = nimOptimDefaultControl(), hessian = FALSE)

Arguments

par

Initial values for the parameters to be optimized over.

fn

A function to be minimized (or maximized), with first argument the vector of parameters over which minimization is to take place. It should return a scalar result.

gr

A function to return the gradient for the "BFGS", "CG" and "L-BFGS-B" methods.

...

IGNORED

method

The method to be used. See `Details` section of optim. One of: "Nelder-Mead", "BFGS", "CG", "L-BFGS-B". Note that the R methods "SANN", "Brent" are not supported.

lower

Vector or scalar of lower bounds for parameters.

upper

Vector or scalar of upper bounds for parameters.

control

A list of control parameters. See Details section of optim.

hessian

Logical. Should a Hessian matrix be returned?

Value

optimResultNimbleList

See Also

optim