Reputation: 2150
Does Matlab have an equivalent to nlminb
in R?
I realize that lsqcurvefit
is available in Matlab, but I specifically want a function that uses a derivative-based method, ideally exactly the same one as nlminb
uses.
nlminb
is described in this Stats.StackExhange.com answer.
I do not want to use the 'trust-region-refelective'
method emplyed by lsqcurvefit
for constrained problems.
Upvotes: 0
Views: 775
Reputation: 18484
Matlab's fmincon
uses Quasi-Newton methods with constraints if the appropriate 'Algorithm'
option is specified. Apparently R's nlminb
is based on the L-BFGS-B
code. Using the 'interior-point'
algorithm this method of approximating the Hessian can be specified:
options = optimoptions('fmincon','Algorithm','interior-point','Hessian','lbfgs');
Unless you're running out of memory, the value of using 'lbfgs'
over the default 'bfgs'
is questionable. Try them all.
Upvotes: 1