|
From: Hans-Bernhard B. <HBB...@t-...> - 2008-10-29 11:55:55
|
peterchun wrote: > Hi, > I am having some problems with the fit of a straight line. > > I want to get a line of best fit for the 3rd column. > It really should give > for > f(x)=m*x+c > m=0 > c=293255 Sorry, but for technical reasons 'fit' fails at finding zeroes as target parameters. The problem is with the way we compute derivatives WRT parameters. Moreover, even if that did work, it also doesn't work well to have fit parameters with wildly different orders of magnitude. Zero is infinitely different from all other numbers in that respect... :-( So you'll have to shift the m parameter away from zero. Something like: f(x) = (m-2e5)*x + c |