[SciPy-User] How to fit data with errorbars

Nathaniel Smith njs at pobox.com
Wed Feb 17 13:04:11 EST 2010


On Wed, Feb 17, 2010 at 9:12 AM, Joe Harrington <jh at physics.ucf.edu> wrote:
> The routine below does the job.  I was surprised not to find this
> routine in numpy or scipy as it's very standard (I'm still convinced I
> must have missed it, so somebody please embarrass me and point it
> out).

Err, it may be very standard, but what is it? :-) It doesn't jump out
at me as being a least-squares fitter (or if it is then it's
implemented in a strange way), and I don't have a copy of Numerical
Recipes handy. (Nor, honestly, does NR have a great reputation when it
comes to statistical stuff, AFAICT.)

> The routine has a number of parameters that are standard in other
> numerical packages, such as IDL, for *every* fitting routine.  We
> should consider adding these parameters to all our fitting routines,
> as well, since having them encourages people to fit (more) properly
> (i.e., actually assess the goodness of fit, etc.).

Here I certainly agree. (Cf. R again, where it is just assumed that
every fitting routine no matter how ordinary or exotic will have a
'weights' argument, diagnostic plots, etc.)

-- Nathaniel



More information about the SciPy-User mailing list