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.