FindFit NMinimize and Nelder-Mead Optimization

*To*: mathgroup at smc.vnet.net*Subject*: [mg80218] FindFit NMinimize and Nelder-Mead Optimization*From*: Lyle Gordon <lgordon at gmail.com>*Date*: Wed, 15 Aug 2007 04:12:37 -0400 (EDT)

I am running a non-linear curve fit using constrained global optimization: FindFit and the NMinimize method NelderMead. After running for a few minutes an error pops up saying that there was an invalid comparison with some number, 0.064 for example. It appears that for some reason the first of the variables (k) that I am curve- fitting to determine has been set to a number. I'm not sure if this is a bug in Mathematica or in my implementation. This error pops up a few more times but the progress continues and the error is supressed but the final curve fit does not seem to be ideal. Any suggestions would be great. Thanks very much, Lyle Gordon Orthopaedic Biomechanics Lab Sunnybrook Health Sciences Centre Toronto, Ontario. Here is the sample of the code I am using, sorry for the \[Tau]1 and \ [Tau]2: fit = FindFit[ fakedata, {functiontofit[k, c, \[Tau]1, \[Tau]2, treal], 0.1 > k > 0 && 100 > c > 0 && 0.1 > \[Tau]1 > 0 && 0.1 > \[Tau]2 > 0 && \[Tau]2 > \[Tau]1}, {{k, 0.005}, {c, 20}, {\[Tau]1, 0.01}, {\[Tau]2, 0.02}}, treal, EvaluationMonitor :> {Print["E: ", k, ", ", c, ", ", \[Tau]1, ", ", \[Tau]2]; Clear[k]}, Method -> {"NMinimize", Method -> "NelderMead"}]