[R] Minimize function of several variables?

Yves Gauvreau cyg at sympatico.ca
Tue Dec 7 01:03:03 CET 1999


Is there something like the Matlab function FMINS in any R packages? Here is the help file of fmins in case something similar exist under R with a different name.

Thanks in advance.

Yves Gauvreau

function [x, options] = fmins(funfcn,x,options,grad,varargin)
%FMINS  Minimize function of several variables.
%   X = FMINS('F',X0) attempts to return a vector X which is a local
%   minimizer of F(x) near the starting vector X0.  'F' is a string
%   containing the name of the objective function to be minimized.
%   F(x) should be a scalar valued function of a vector variable.
%   X = FMINS('F',X0,OPTIONS) uses a vector of control parameters. If
%   OPTIONS(1) is positive, intermediate steps in the solution are
%   displayed; the default is OPTIONS(1) = 0.  OPTIONS(2) is the
%   termination tolerance for x; the default is 1.e-4.  OPTIONS(3) is
%   the termination tolerance for F(x); the default is 1.e-4.
%   OPTIONS(14) is the maximum number of function evaluations; the 
%   default is OPTIONS(14) = 200*length(x).  The other components of 
%   OPTIONS are not used as input control parameters by FMIN.  
%   For more information, see FOPTIONS.
%   X = FMINS('F',X0,OPTIONS,[],P1,P2,...) provides for additional
%   arguments which are passed to the objective function, F(X,P1,P2,...)
%   Pass an empty matrix for OPTIONS to use the default value.
%   [X,OPTIONS] = FMINS(...) returns the number of function evaluations
%   in OPTIONS(10).
%   FMINS uses a Nelder-Mead type simplex search method.
%   See also FMIN, FOPTIONS. 

%   Reference: J. E. Dennis, Jr. and D. J. Woods, New Computing
%   Environments: Microcomputers in Large-Scale Computing,
%   edited by A. Wouk, SIAM, 1987, pp. 116-122.

%   Copyright (c) 1984-96 by The MathWorks, Inc.
%   $Revision: 5.11 $  $Date: 1996/10/28 22:13:21 $

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/19991206/e03287f9/attachment.html

More information about the R-help mailing list