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

Home » Public Forums » archive » Re: CURVEFIT.PRO standard deviations?
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: CURVEFIT.PRO standard deviations? [message #30648 is a reply to message #30641] Mon, 13 May 2002 09:19 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Ralf Flicker <rflicker@gemini.edu> writes:

> Andrew Noymer wrote:
>> LINFIT parameters, sigma, and chi-square :
>> -13.7844 2.91336
>> 1.32243 0.0944590
>> 266.783
>> CURVEFIT parameters, sigma, and chi-square :
>> -13.7839 2.91333
>> 0.388221 0.0277362
>> 11.5993
>>

Here is what MPFITFUN / MPCURVEFIT produces:

MPCURVEFIT parameters, sigma, and chi-square :
-14.5118 2.95626
0.388305 0.0277388
200.777

> A closer inspection reveals something patently absurd with the
> CURVEFIT and LMFIT sigmas: they don't vary with the noise in the
> data, i.e., they are always the same. This means that they must have
> been normalized to the current chi-square (whoever would come up
> with such an idea ought to be flogged in public). Futhermore, they
> sometimes are and sometimes are not divided by the number of degrees
> of freedom (as, indeed, the final value should be). So comparing the
> three procedures LINFIT, CURVEFIT and LMFIT, I surmise the following
> transformations that need to be applied to have them return the same
> numbers (which hopefully are the "right" ones too):

Ralph, these are not necessarily patently absurd. The "sigma" values
of a fitting program typically mean to find the confidence limits on a
parameter based on a change in the chi-squared of +1.

Since you left your fit unweighted, i.e., WEIGHTS=1, the resulting
chi-squared value is too high. You have weighted your data so highly
that the fit parameters are hypersensitive to any fluctuations in the
data. Hence the confidence region is artificially too small. What
you need to do is decrease the weights, corresponding to increasing
the individual uncertainties, until you achieve a reduced chi-squared
of order unity. Then the parameter errors reported by CURVEFIT or
MPFITFUN / MPCURVEFIT will be appropriate. This is more or less
described in the MPFIT.PRO documentation for the PERROR keyword.

Good luck,
Craig

MPFIT family of fitting functions found at:
http://cow.physics.wisc.edu/~craigm/idl/idl.html (under fitting)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Object Graphics when using 'stop'
Next Topic: Re: Matlab emacs package similar to idlwave

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

Current Time: Sat Oct 11 03:16:42 PDT 2025

Total time taken to generate the page: 2.48734 seconds