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

Home » Public Forums » archive » Re: curve fitting: works badly?
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: curve fitting: works badly? [message #3790 is a reply to message #3661] Wed, 08 March 1995 12:44 Go to previous message
agraps is currently offline  agraps
Messages: 35
Registered: September 1994
Member
vek@spacsun.rice.edu (Vincent E. Kargatis) writes:

> This is great (really). But has anyone done a (linear) curvefit that
> includes both X and Y errors? A much harder problem, but much more
> realistic (c'mon, the Real World's *fun*)! NUMERICAL RECIPES has one for
> linear fitting (ch. 15.3), but not for non-linear (no surprise, since it's
> probably nigh impossible). I don't suppose anyone has translated the NR
> routine into IDL?

I think the IDL Goddard Astronomy Library has IDL code to do linear
curvefit with x and y errors. See the IDL FAQ for how to get to the
library. I don't have the library information handy (but Bill Thompson
might :) ).

> Also, why does CURVEFIT want weights instead of errors? W = 1/(sig_y)^2.
> Whose datasets give them weights? Mine all give me errors! :-)

Mine too!

Seriously, my understanding of why weights instead of errors
is because:

1) Bevington did it that way.
2) It has a precise mathematical definition that can be implemented
easily in least-squares algorithms.
2) There are several different kinds of errors (i.e. instrumental,
statistical, etc. See Bevington for a good discussion of error analysis).

Speaking of errors, if you have criteria for checking whether a fit is
good, looking at the sigma of the output fit parameters is sometimes
not enough because the parameters are correlated to each other. That's
why I added a covariance output matrix to my version of CURVEFIT that
quantitatively describes the correlated variances between the fit
parameters. See my previous post on the Marquardt-Levenberg thread
here on how to do this.

Amara








--

************************************************************ *************
Amara Graps email: agraps@netcom.com
Computational Physicist vita: finger agraps@sunshine.arc.nasa.gov
Intergalactic Reality bio: finger -lm agraps@netcom.com
************************************************************ *************
"Awaken the mind without fixing it anywhere." --Kungo Kyo
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: diagrami: Simple Diagrammer for IDL & PV-Wave Language Programs
Next Topic: filled contour bug (again)

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

Current Time: Sat Oct 11 05:23:41 PDT 2025

Total time taken to generate the page: 1.84112 seconds