Skip to content
Prev 181298 / 398502 Next

using optimize() correctly ...

Hello Berend,
Berend Hasselman wrote:
Ah ok, I didn't read the manual page carefully enough.

Do you know if R has a function to find the global maximum/minimum of a
function of x over a given interval?

nlminb(), optim(), in particular the option `method = "L-BFGS-B"' or the 
function spg() in "BB" package were recommended to use if I wanted to
optimize a function over x and y given their respective intervals. Will
they also potentially only give me the local maxima/minima? I am not a
regular R user, so my knowledge is clearly not where is could/should be.

Thanks,
Esmail