|
From: <ra...@be...> - 2006-08-05 19:50:27
|
Perhaps the mailing list does not allow attachements. I'll paste the data here: 1,0.4 2,0.8 3,1.2 4,1.6 5,2 6,2.4 7,2.8 8,3.2 9,3.6 10,4 11,4.4 12,4.8 13,5.2 14,5.6 15,6 It seems unlikely that playing with scaling factors should be necessary as this is the simplest data set possible and both variables are in the same order of magnitude. Thanks for the advice, though. - Jonathan > The attachment didn't make it. > What is the range for x? > If all number differ to much gnuplot will not find a good fit. > You might have to play with scaling factors. > > Tammo > > > > On 5 Aug 2006 at 10:34, ra...@be... wrote: > >> 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 > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |