Rvmminb: Variable metric nonlinear function minimization with bounds...

Description Usage Arguments Details Value See Also Examples


A bounds-constarined R implementation of a variable metric method for minimization of nonlinear functions subject to bounds (box) constraints and masks (fixed parameters).

See manual Rvmmin.Rd for more details and examples.


   Rvmminb(par, fn, gr, lower, upper, bdmsk, control = list(), ...)



A numeric vector of starting estimates.


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.


A function that returns the gradient of the objective at the supplied set of parameters par using auxiliary data in .... The first argument of fn must be par. This function returns the gradient as a numeric vector.

Note that a gradient function MUST be provided. See the manual for Rvmmin, which is the usual way Rvmminb is called. The user must take responsibility for errors if Rvmminb is called directly.


A vector of lower bounds on the parameters.


A vector of upper bounds on the parameters.


An indicator vector, having 1 for each parameter that is "free" or unconstrained, and 0 for any parameter that is fixed or MASKED for the duration of the optimization.


An optional list of control settings.


Further arguments to be passed to fn.


This routine is intended to be called from Rvmmin, which will, if necessary, supply a gradient approximation. However, some users will want to avoid the extra overhead, in which case it is important to provide an appropriate and high-accuracy gradient routine.

Note that bounds checking, if it is carried out, is done by Rvmmin.

Functions fn must return a numeric value. The control argument is a list. Successful completion. The source code Rvmmin for R is still a work in progress, so users should watch the console output.

The control argument is a list.


A limit on the number of iterations (default 500). This is the maximum number of gradient evaluations allowed.


A limit on the number of function evaluations allowed (default 3000).


Set 0 (default) for no output, >0 for trace output (larger values imply more output).


= TRUE if we want warnings generated by optimx. Default is TRUE.


To maximize user_function, supply a function that computes (-1)*user_function. An alternative is to call Rvmmin via the package optimx.


To adjust the acceptable point tolerance (default 0.0001) in the test f <= fmin + gradproj * steplength * acctol

As of 2011-11-21 the following controls have been REMOVED


There is now a choice of numerical gradient routines. See argument gr.


A list with components:


The best set of parameters found.


The value of the objective at the best set of parameters found.


A vector of two integers giving the number of function and gradient evaluations.


An integer indicating the situation on termination of the function. 0 indicates that the method believes it has succeeded. Other values:


indicates that the iteration limit maxit had been reached.


indicates that the initial set of parameters is inadmissible, that is, that the function cannot be computed or returns an infinite, NULL, or NA value.


indicates that an intermediate set of parameters is inadmissible.


A description of the situation on termination of the function.


Returned index describing the status of bounds and masks at the proposed solution. Parameters for which bdmsk are 1 are unconstrained or "free", those with bdmsk 0 are masked i.e., fixed. For historical reasons, we indicate a parameter is at a lower bound using -3 or upper bound using -1.

See Also



## See Rvmmin.Rd

Search within the Rvmmin package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.