Arnaud Mosnier
2012-May-01 19:58 UTC
[R] Define lower-upper bound for parameters in Optim using Nelder-Mead method
Dear UseRs, Is there a way to define the lower-upper bounds for parameters fitted by optim using the Nelder-Mead method ? Thanks, Arnaud [[alternative HTML version deleted]]
Thomas Lumley
2012-May-01 20:12 UTC
[R] Define lower-upper bound for parameters in Optim using Nelder-Mead method
On Wed, May 2, 2012 at 7:58 AM, Arnaud Mosnier <a.mosnier at gmail.com> wrote:> Dear UseRs, > > Is there a way to define the lower-upper bounds for parameters fitted by > optim using the Nelder-Mead method ? >It depends a bit on whether it's plausible that the solution is on the boundary. If not, simply returning Inf for values outside the range will work. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland
(Ted Harding)
2012-May-01 21:39 UTC
[R] Define lower-upper bound for parameters in Optim using Nelder-Mead method
On 01-May-2012 19:58:41 Arnaud Mosnier wrote:> Dear UseRs, > > Is there a way to define the lower-upper bounds for parameters > fitted by optim using the Nelder-Mead method ? > > Thanks, > ArnaudThe Nelder-Mead method does not provide built-in capability to set bounds on the range of paramaters. However, you can achieve it "by hand" by re-defining the function being minimised, so that it tests whether an out-of-range parameter parameter value is being used. If not out-of-range, then return the standard value of the function. If out-of range, then return a very large value. Nelder-Mead will very happily "bounce off" high walls of this kind, and if the minimum of the function is at the wall will happily converge as close to it as you please. Hoping this helps, Ted. ------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at wlandres.net> Date: 01-May-2012 Time: 22:39:15 This message was sent by XFMail