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

Home » Public Forums » archive » Re: the problem of PERROR in MPFITFUN
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: the problem of PERROR in MPFITFUN [message #53084 is a reply to message #53079] Thu, 15 March 2007 07:44 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
duxiyu@gmail.com wrote:
> In my work, independent variable X is time and measured dependent
> variable Y is magnetic field. The instrument do not give the measured
> error.
> Do I use 1 in MPFITFUN for errors of Y?
> Is the PERROR useless at this time?
>
> I do not understand the following paragraph in the instructions of
> MPFITFUN.
> Who can give me some explanations for it?
>
> ; *If* you can assume that the true reduced chi-squared
> ; value is unity -- meaning that the fit is implicitly
> ; assumed to be of good quality -- then the estimated
> ; parameter uncertainties can be computed by scaling PERROR
> ; by the measured chi-squared value.
> ;
> ; DOF = N_ELEMENTS(X) - N_ELEMENTS(PARMS) ; deg of
> freedom
> ; PCERROR = PERROR * SQRT(BESTNORM / DOF) ; scaled
> uncertainties

To do proper curve fitting, you need error estimates for your data
points. Using those error estimates, the reduced chi-squared value
will typically be around 1.0 or better for a good fit; if it's much
large than 1.0, you've probably got a poor fit and should try a
different model function. If it is a good fit, the rate of change in
the chi-squared function with respect to a change in a parameter
estimate gives you a measure of how precisely determined that
parameter is by this data set.

However, it's not uncommon to have no easy way to estimate the errors.
This is a bad idea, and you should always try to fix it by coming up
with a proper error estimate. However, if you're willing to assume
that a) all the data points have exact the same error estimate and b)
that the fit is a good one, then it is possible to calculate what
error estimate would give you a chi-squared value of exactly 1.0.
Using that error estimate will then allow calculation of the
uncertainties in the parameter estimates.
This approach should not be used unless you have no alternative: it
gives you no feedback to indicate whether or not you've got a good
match between your model and the data that you are fitting it to.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: change colors of IDL shell on OS X?
Next Topic: Re: :_(x,y,z)_

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

Current Time: Fri Oct 10 22:59:28 PDT 2025

Total time taken to generate the page: 0.63904 seconds