Learn R Programming

incubate (version 1.4.0)

minObjFunAlt: Minimize an objective function with alternative optimizer

Description

The primary optimization routine is BFGS from stats::optim. If this fails for some reason we try an alternative which is implemented here. It can use the derivative-free minimizaiton through bobyqa or the PORT-routine nlminb.

Usage

minObjFunAlt(
  objFun,
  start,
  lower = -Inf,
  upper = +Inf,
  verbose = 0,
  method = c("bobyqa", "nlminb")
)

Value

optimization object with some common entries like parOpt, valOpt

convergence, methodOpt and counts. Or NULL in case of failure.

Arguments

objFun

function to minimize

start

vector of start values for parameters

lower

numeric. lower bound for parameters (boxed constraint)

upper

numeric. upper bound for parameters (boxed constraint)

verbose

numeric. Verbosity level

method

Specifies which optimizer to use

Details

This is only a thin wrapper to the chosen alternative optimizer.