Group Abstract Group Abstract

Message Boards Message Boards

NonlinearModelFit screws up the fit when facing constraints

GROUPS:
Hello everybody.
I am using a model of several gaussians to fit infrared absorption data. For this purpose, I define the resonances I expect at certain wavenumbers (i.e. the wavelength) using "NormalDistribution" and then use the sum of them as my model.
To find starting values, I use an interactive "Manipulate" environment which is working nicely. Using these, Mathematica finds the fit requested rather quick. Some of the parameters are running to values which are not physical. Therefore, I wanted to restrict these parameters using the constraints as described in the Documentation. As soon as I have a constraint on a single parameter, Mathematica takes much longer to compute a fit and the output is much worse or even absolutely stupid (meaning there is no "fit" at all!).

This behaviour I do not understand and would like to know how I can circumvent this situation (either using a different function than "NonlinearModelFit" or some other options.

Any opinion on this is welcome!

Best regards

PS: I am working on a short example for you guys. I will provide it as soon as possible.
Marcel
POSTED BY: Marcel Rothfelder
Answer
5 months ago
Have a look there for an earlier problem of the same kind

http://www.mathematica.ch/dmug-archive/2005/msg00420.html

basically one has to restrict the parameters to an area where
  • the solution lies
  • no singularities of the model take place
NonlinearModelFit[] can't resist a singularity of the model because of it's usage of the Marquardt-Levenberg-Algorithm as one of its algorithms. 
POSTED BY: Udo Krause
Answer
5 months ago