|
From: <ra...@be...> - 2006-08-05 17:34:55
|
I was looking for a good, simple program that will let me fit some data to
theoretical models. I decided to have a look at gnuplot and test it by
seeing if it can perform a simple linear fit. With the file attached
(testfile.csv), which fits y=0.4*x, I executed
gnuplot> f(x) = a*x
gnuplot> fit f(x) "testfile.csv" via a
I got the result
Iteration 3
WSSR : 4.13793 delta(WSSR)/WSSR : -4.55122e-09
delta(WSSR) : -1.88326e-08 limit for stopping : 1e-05
lambda : 0.00822598
resultant parameter values
a = 1.10345
After 3 iterations the fit converged.
final sum of squares of residuals : 4.13793
rel. change during last iteration : -4.55122e-09
degrees of freedom (ndf) : 14
rms of residuals (stdfit) = sqrt(WSSR/ndf) : 0.54366
variance of residuals (reduced chisquare) = WSSR/ndf : 0.295567
Final set of parameters Asymptotic Standard Error
======================= ==========================
a = 1.10345 +/- 0.01706 (1.546%)
correlation matrix of the fit parameters:
a
a 1.000
Either I am missing something, or there is something very wrong with
gnuplot's fit command. The data should fit y=0.4*x exactly. I've tried
setting a to 0.43 before running the fit command and gotten the same
result.
Any help?
- Jonathan
|