Skip to content
Prev 180547 / 398506 Next

About the efficiency of R optimization function

popo UBC wrote:
Hi Popo,

Truthfully, I do not have much direct experience with the R optim function.
For my linear optimization needs I usually use a package called HOPDM which
implements an interior point method. For nonlinear problems I use MINOS
which relies on conjugate gradients and interfaces nicely with the
simulation models I use in my field of study.

I have however taken a groundwater course where the class was assigned an
optimization problem concerning water supply. The objective function was
nonlinear and contained tens or hundreds of variables depending on the level
of discretization used in the numerical model. Some students used MINOS,
others used MATLAB and a few used R. All three packages generated similar
results.

If you are solving a maximum likelyhood problem, check out the mle function
in the stats4 package- it appears to be a front-end to optim which is
designed to tackle these sorts of problems. And, as I noted before, it is
possible to call a C or Fortran optimizer that you trust from within R.
Compared to my experience with MATLAB, calling an external Fortran routine
was an absolute walk in the park with R.

Good luck!

-Charlie

-----
Charlie Sharpsteen
Undergraduate
Environmental Resources Engineering
Humboldt State University