安装无错误(有效)
我使用以下命令在 Gnuplot 5.0 中进行了简单的线性拟合:
f(x)=a*x+b
fit f(x) 'file.dat' using 1:2 via a,b
我得到输出:
degrees of freedom (FIT_NDF) : 6
rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 0.00794747
variance of residuals (reduced chisquare) = WSSR/ndf : 6.31623e-05
Final set of parameters Asymptotic Standard Error
======================= ==========================
p1 = -0.00964423 +/- 0.0004976 (5.159%)
p2 = 1.07794 +/- 0.01908 (1.77%)
结果是这样的:
拟合有错误
然后我添加了非常小的误差线,只是为了看看它们如何影响拟合结果(预计与之前情况的差异非常小),但是使用命令
f(x)=a*x+b
fit f(x) 'file.dat' using 1:2:3 yerrors via a,b
我完全不适合:
输出是:
degrees of freedom (FIT_NDF) : 6
rms of residuals (FIT_STDFIT) = sqrt(WSSR/ndf) : 750.565
variance of residuals (reduced chisquare) = WSSR/ndf : 563348
p-value of the Chisq distribution (FIT_P) : 0
Final set of parameters Asymptotic Standard Error
======================= ==========================
p1 = -0.0115247 +/- 0.0003419 (2.967%)
p2 = 1.15636 +/- 0.01483 (1.282%)
此外,如果我将误差设置得更大,输出仍然是微小误差的输出。
有人有建议吗?我做错了什么?
Data
y x dy
0.64345112296614271 45.082768716145587 6.6513808914832773E-004
0.71703932263695935 38.322543680055119 1.8140129703996476E-004
0.62214826712778870 46.283953074076770 1.2093419803380392E-004
0.70999997854232788 39.152893923419398 3.9303614359375108E-004
0.75723404482236245 33.204658354605364 6.6513808915369822E-004
0.69366599317566635 39.410047372618159 5.8653086043387384E-003
0.75948892906677234 33.491967428263528 6.6513808915369822E-004
0.79365751671683227 28.533494222921814 1.2758557891916475E-002
对于第一个图,我只使用了前两列,对于第二个图,我使用了第三列来表示 y 中的错误。