Learn R Programming

minqa (version 1.1.13)

newuoa: An R interface to the NEWUOA implementation of Powell

Description

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

Usage

newuoa(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.
  • fvalThe value of the objective at the best set of parameters found.
  • fevalNumber of function evaluations to determine the optimum
  • ierrAn integer error code. A value of zero indicates success. Other values (consistent with BOBYQA values) are [object Object],[object Object],[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],[object Object]

References

M. J. D. Powell, "The NEWUOA 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 NEWUOA for minimization without derivatives" IMA Journal of Numerical Analysis, 2008; 28: 649-664. M. J. D. Powell (2007) "Developments of NEWUOA for unconstrained minimization without derivatives" Cambridge University, Department of Applied Mathematics and Theoretical Physics, Numerical Analysis Group, Report NA2007/05, http://www.damtp.cam.ac.uk/user/na/NA_papers/NA2007_05.pdf.

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
}
(x2 <- newuoa(c(1, 2), fr))
## => optimum at c(1, 1) with fval = 0

# check the error exits
# too many iterations
x2e<-newuoa(c(1, 2), fr, control = list(maxfun=50))
str(x2e)

# Throw an error because npt is too small -- does NOT work as of 2010-8-10 as 
#    minqa.R seems to force a reset.
x2n<-newuoa(c(2,2), fr, control=list(npt=1))
str(x2n)

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

Run the code above in your browser using DataLab