Re: NonLinearFit
- To: mathgroup at smc.vnet.net
- Subject: [mg8684] Re: NonLinearFit
- From: tburton at cts.com (Tom Burton)
- Date: Mon, 15 Sep 1997 02:49:11 -0400
- Organization: Brahea Consulting
- Sender: owner-wri-mathgroup at wolfram.com
On 12 Sep 1997 04:14:37 -0400, in comp.soft-sys.math.mathematica Ramin Sina wrote: >Hi all, I remember vaguely that sometime ago there was a discussion >about a bug in the NonlinearFit package. Could someone please explain >again what the problem is. The problem seems to be limited to LINEAR fitting problems given to the NONLINEAR fitting packages NonlinearFit and NonlinearRegression. So if you direct your linear fitting problem instead to Fit, you're OK. The symptom is that a (superfluous) constant term in a polynomial is mishandled. For example, when asked to fit the model "1 + a + b x" to the data {{0,0},{1,0},{2,0}}, NonlinearFit returns the fitted model "1" instead of the correct answer "0"; and NonlinearRegression returns the rule a -> 0 instead of the correct rule a -> -1. This problem was reported to this Group by David Junkin last May. I verified it and reported it to WRI. David Withoff of WRI quickly replied with a corrected version of NonlinearFit.m.=20 I filed his reply for later action ;) Your message prompted me to act at last. Yes, the corrected version avoids the symptom. If you want to apply these nonlinear fitting tools to a linear fitting problem, you might want to ask me via e-mail for a copy of this corrected package. Or just use Fit instead. >Also, I've found two different versions of >NonlinearFit packages on the Mathsource- One by Pekka Janhunen and >another by John Novak. What is the difference between the two packages? The package Novak authored .../StandardPackages/Statistics/NonlinearFit distributed with MMA 3.0.1 (and 3.0.0, I presume). I don't know about the other one. Tom Burton