[SciPy-User] How to fit data with errorbars
Tue Feb 16 22:18:17 CST 2010
On Tue, Feb 16, 2010 at 7:48 PM, <firstname.lastname@example.org> wrote:
> I didn't realize that it is a problem linear in parameters if the
> objective is to fit a polynomial.
I dunno, I'm just going off a quick glance at the documentation for
"polyfit", which the OP wanted to use in the first place :-).
> Essentially the same calculations are done in statsmodels.WLS plus
> you get additional results and test statistics.
> something like
> wls_results = scikits.statsmodels.WLS(Y, np.vander(X,2), weights=1/stddevs)
> example in statsmodels\examples\tut_ols_wls.py
Yeah, using real statistics code is always a better idea when
available. (Actually, I would use R for this. Don't tell anyone!)
More information about the SciPy-User