comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: On errors calculated by curve-fitting routines
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: On errors calculated by curve-fitting routines [message #59077] Thu, 06 March 2008 00:51 Go to next message
Anthony[1] is currently offline  Anthony[1]
Messages: 20
Registered: December 2006
Junior Member
On Mar 6, 3:08 am, Gernot Hassenpflug <ger...@nict.go.jp> wrote:
> Hello all,
>
> I'm using IDL 6.1, as well as Maple 11, Mathematica 6.0, Matlab 7.5
> and the statistical language R. My goal is to calculate the covariance
> matrix of parameters of a second order polynomial curve fit. To
> clarify: I refer to this as linear fitting, since the parameters are
> linear; however, many books, papers and routines refer to this as
> non-linear fitting.
>
> Matlab and Mathematica do not have built-in functions to do this
> (Mathematica has an add-on module which my institute has not bought)
> so I am comparing the parameter covariance matrix from IDL, Maple, R
> and my own programmed output learned from section 15.4 of Numerical
> Recipes, 2nd edition, and a paper by Keith Burrell in the American
> Journal of Physics Vol. 58, No. 2, pp 160--164 (1990) titled "Error
> analysis for parameters determined in nonlinear least-square fits",
> both describing the same method which uses the variances of the
> dependent data combined with the derivatives of the fitting function
> wrt the fitted parameters; i.e., the dependent data values themselves
> are not used, apparently.
>
> I find that in IDL the routines POLY_FIT, LMFIT and CURVEFIT can all
> calculate the parameter covariance matrix and it is documented that
> LMFIT uses the method of Burrell and Numerical Recipes. I cannot tell
> what method the other two routines use.
>
> Maple seems to use a different method apparently described on pp
> 197--198 of David M. Himmelblau's 1970 book titled "Process Analysis
> by Statistical Methods", which I have ordered used but not yet
> received.
>
> I am hoping that contributors to this list could give their comments
> and opinions on what method of parameter variance and covariance is
> most sound, and which routines are therefore preferred for a
> polynomial fitting case (possibly over-determined).
>
> Many thanks in advance,
> Gernot Hassenpflug
> --
> BOFH excuse #72:
>
> Satan did it

Hi Gernot,

It's worth looking into MPFIT ("Robust non-linear least squares curve
fitting"):

http://cow.physics.wisc.edu/~craigm/idl/fitting.html

Cheers,
Anthony
Re: On errors calculated by curve-fitting routines [message #59210 is a reply to message #59077] Thu, 06 March 2008 18:25 Go to previous message
Gernot Hassenpflug is currently offline  Gernot Hassenpflug
Messages: 18
Registered: April 2001
Junior Member
Anthony <anthonysmith80@gmail.com> writes:

> On Mar 6, 3:08 am, Gernot Hassenpflug <ger...@nict.go.jp> wrote:
>> Hello all,
>>
>> I'm using IDL 6.1, as well as Maple 11, Mathematica 6.0, Matlab 7.5
>> and the statistical language R. My goal is to calculate the covariance
>> matrix of parameters of a second order polynomial curve fit. To
>> clarify: I refer to this as linear fitting, since the parameters are
>> linear; however, many books, papers and routines refer to this as
>> non-linear fitting.
/../
>> I am hoping that contributors to this list could give their comments
>> and opinions on what method of parameter variance and covariance is
>> most sound, and which routines are therefore preferred for a
>> polynomial fitting case (possibly over-determined).
/../
> It's worth looking into MPFIT ("Robust non-linear least squares curve
> fitting"):
>
> http://cow.physics.wisc.edu/~craigm/idl/fitting.html

Hello Anthony and thanks. That was actually the last page I studied
before posting my original query! There are just so many
possibilities, and I am wondering what is the most accepted method of
calculating not the fit so much as the covariance matrix of the fitted
parameters. Mr. Markwardt's page gives another reference for this
which I have to look at:

Bevington, P. R. and Robinson, D. K. 1992, Data Reduction and Error
Analysis for the Physical Sciences, 2nd Ed., McGraw-Hill, Inc.

Best regards,
Gernot Hassenpflug
--
BOFH excuse #448:

vi needs to be upgraded to vii
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: widget draw background color
Next Topic: Object Graphics Windows in X Windows

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 02:12:22 PDT 2025

Total time taken to generate the page: 2.31800 seconds