error estimation in a non-linear least squares fitting

Robert Kern robert.kern at gmail.com
Wed Oct 22 14:40:54 EDT 2008


Evelien wrote:
> Thanks Robert for your reply. I must say I am kind of disappointed if
> that is the only solution. I thought that such a standard problem as
> least squares fitting, would always give you an estimation of the
> error bars, without having to look up how you can convert a covariance
> matrix into error bars...

If you want an all-singing, all-dancing statistics-oriented nonlinear 
least-squares interface, you can use scipy.odr. The numerical algorithm in 
leastsq() outputs a covariance matrix naturally. Interpreting that to give you 
statistical error bars requires some care and judgment. scipy.optimize is not a 
statistical package.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list