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

Home » Public Forums » archive » Explanation for keywords of POLY_FIT?
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
Explanation for keywords of POLY_FIT? [message #63085] Tue, 28 October 2008 09:41 Go to next message
Karlo Janos is currently offline  Karlo Janos
Messages: 31
Registered: July 2008
Member
Hello everybody,

I am looking for an explanation for some of the keywords of POLY_FIT.
I understand SIGMA. But what are YERROR and YBAND in the mathematical
sense? How are these values calculated? And how does MEASUREMENT_ERROR
influence these output values?
Regards

Karlo
Re: Explanation for keywords of POLY_FIT? [message #63137 is a reply to message #63085] Wed, 29 October 2008 06:50 Go to previous messageGo to next message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
> I am looking for an explanation for some of the keywords of POLY_FIT.
> I understand SIGMA. But what are YERROR and YBAND in the mathematical
> sense? How are these values calculated? And how does MEASUREMENT_ERROR
> influence these output values?

It's been a while since I used it, so this is just off the top of my
head being refreshed by looking at the help page - I wouldn't be
shocked if it's wrong:

If your data points are X, Y and the fit is X, YFIT, then YERROR =
stddev(Y - YFIT).

The estimated error on the values YFIT is YBAND.

MEASUREMENT_ERROR only influences these via changes to YFIT, but the
form is complicated and depends on the degree of the polynomial... if
you need the detailed expression, I'd just follow the NR derivation
for linear least squares fit with whatever degree polynomial you need.

-Jeremy.
Re: Explanation for keywords of POLY_FIT? [message #63240 is a reply to message #63085] Thu, 30 October 2008 04:48 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
>> If your data points are X, Y and the fit is X, YFIT, then YERROR =
>> stddev(Y - YFIT).
>
> That is not correct (as I found out now), but you gave me the hint for
> finding the correct answer!
>
> YERROR is the "Root Mean Squared Error" aka the "fit standard error".
> Dr. Google gives the definition. ;)

Aha! Yeah, that makes more sense anyways.

>> MEASUREMENT_ERROR only influences these via changes to YFIT, but the
>> form is complicated and depends on the degree of the polynomial... if
>> you need the detailed expression, I'd just follow the NR derivation
>> for linear least squares fit with whatever degree polynomial you need.
>
> I assume that this is "weighted linear least squares", when using
> MEASUREMENT_ERROR.

Yup, that should be right. Some of the fitting procedures
alternatively let you use a WEIGHT keyword instead, so you can
directly weight the data points instead (depricated, since it's not a
great idea, but can be convenient to explicitly set some to zero), but
it looks like POLY_FIT isn't one of them.

-Jeremy.
Re: Explanation for keywords of POLY_FIT? [message #63247 is a reply to message #63137] Thu, 30 October 2008 01:06 Go to previous message
Karlo Janos is currently offline  Karlo Janos
Messages: 31
Registered: July 2008
Member
> If your data points are X, Y and the fit is X, YFIT, then YERROR =
> stddev(Y - YFIT).

That is not correct (as I found out now), but you gave me the hint for
finding the correct answer!

YERROR is the "Root Mean Squared Error" aka the "fit standard error".
Dr. Google gives the definition. ;)


> MEASUREMENT_ERROR only influences these via changes to YFIT, but the
> form is complicated and depends on the degree of the polynomial... if
> you need the detailed expression, I'd just follow the NR derivation
> for linear least squares fit with whatever degree polynomial you need.

I assume that this is "weighted linear least squares", when using
MEASUREMENT_ERROR.

Thanks for your help!

Karlo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: why the variable become -NaN?
Next Topic: New Widgets Needed

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

Current Time: Wed Oct 08 11:54:05 PDT 2025

Total time taken to generate the page: 0.00728 seconds