2

As a physicist, my measurement data almost always has x and y errors. I can fit functions like a x^2 \exp(-b x^2) to it using gnuplot or scipy.optimize.curve_fit in Python. The fit error I get for a and b in both programs only gives me the grade of the fit, not the actual error of a and b.

So although I have a covariance matrix, it does not change when I double the y-errors. In the lab manual, it shows how to do weighted linear fits and giving the error correctly.

Is there a software package than does more than just weighting with the y-error? I could roll my own, implementing the formulas from the manual and transforming all data to get a linear fit. But is there an easier way?

4

1 回答 1

0

到目前为止,有几件事发生了变化。有linfit包可以做到这一点。SciPy 函数curve_fit现在具有absolute_sigma将错误x考虑在内的选项。

但是,我现在通过使用 bootstrap 方法来估计我的错误,从而绕过了整个问题。这涉及对数据的不同选择的大量拟合。

于 2015-07-25T20:22:50.030 回答