1

I need to find a minimum of a two-variable function. I currently use the R function optim() but I have just found out that the result varies based on the trial values passed to the function. How to solve this problem? That is the function I refer to


optim(par, fn, gr = NULL, ...,
      method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN",
                 "Brent"),
      lower = -Inf, upper = Inf,
      control = list(), hessian = FALSE)
MSDN.WhiteKnight
  • 664
  • 7
  • 30
  • Can you share the function? You problem is a typical one, you will need to run the optimisation with multiple initial guesses - the search for global optimum is a non-trivial one. – mjs Mar 14 '19 at 13:43

0 Answers0