Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Rvmminu

Variable metric nonlinear function minimization, unconstrained


Description

An R implementation of a variable metric method for minimization of unconstrained nonlinear functions.

See the manual Rvmmin.Rd for details.

Usage

Rvmminu(par, fn, gr, 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.

gr

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 Rvmminu is called. The user must take responsibility for errors if Rvmminu is called directly.

control

An optional list of control settings. See the manual Rvmmin.Rd for details. Some control elements apply only when parameters are bounds constrained and are not used in this function.

...

Further arguments to be passed to fn.

Details

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.

Functions fn must return a numeric value.

Value

A list with components:

par

The best set of parameters found.

value

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

counts

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

convergence

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

1

indicates that the iteration limit maxit had been reached.

20

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.

21

indicates that an intermediate set of parameters is inadmissible.

message

A description of the situation on termination of the function.

See Also

Examples

####in Rvmmin.Rd ####

optimx

Expanded Replacement and Extension of the 'optim' Function

v2020-4.2
GPL-2
Authors
John C Nash [aut, cre], Ravi Varadhan [aut], Gabor Grothendieck [ctb]
Initial release
2020-04-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.