Learn R Programming

minqa (version 1.1.13)

uobyqa: An R interface to the uobyqa implementation of Powell

Description

The purpose of uobyqa is to minimize a function of many variables by a trust region method that forms quadratic models by interpolation.

Usage

uobyqa(par, fn, control = list(), ...)

Arguments

par
A numeric vector of starting estimates.
fn
A function that returns the value of the objective at the supplied set of parameters par using auxiliary data in .... The first argument of fn must be par.
control
An optional list of control settings. See the details section for the names of the settable control values and their effect.
...
Further arguments to be passed to fn.

Value

  • A list with components:
  • parThe best set of parameters found.
  • fvalueThe value of the objective at the best set of parameters found.
  • ierrAn integer error code. A value of zero indicates success. Other values (consistent with BOBYQA values) are [object Object],[object Object]

encoding

UTF-8

Details

Functions fn must return a numeric value.

The control argument is a list. Possible named values in the list and their defaults are: [object Object],[object Object],[object Object],[object Object]

Powell's Fortran code has been slightly modified (thanks to Doug Bates for help on this) to avoid use of PRINT statements. Output is now via calls to C routines set up to work with the routines BOBYQA, NEWUOA and UOBYQA.

References

M. J. D. Powell, "The uobyqa software for unconstrained optimization without derivatives", in Large-Scale Nonlinear Optimization, Series: Nonconvex Optimization and Its Applications , Vol. 83, Di Pillo, Gianni; Roma, Massimo (Eds.) 2006, New York: Springer US.

M. J. D. Powell, "Developments of uobyqa for minimization without derivatives", IMA Journal of Numerical Analysis, 2008; 28: 649-664.

Description was taken from comments in the Fortran code of M. J. D. Powell on which minqa is based.

See Also

optim, nlminb

Examples

Run this code
fr <- function(x) {   ## Rosenbrock Banana function
    100 * (x[2] - x[1]^2)^2 + (1 - x[1])^2
}
(x3 <- uobyqa(c(1, 2), fr))
## => optimum at c(1, 1) with fval = 0
# check the error exits
# too many iterations
x3e<-uobyqa(c(1, 2), fr, control = list(maxfun=50))
str(x3e)


# To add if we can find them -- examples of ierr = 3.

Run the code above in your browser using DataLab