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

Home » Public Forums » archive » Re: Help: Weighted quadratic fitting under IDL?
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: Help: Weighted quadratic fitting under IDL? [message #19408 is a reply to message #19406] Wed, 15 March 2000 00:00 Go to previous messageGo to previous message
Mark Fardal is currently offline  Mark Fardal
Messages: 51
Registered: October 1995
Member
bgibson@spitzer.colorado.edu (Brad K. Gibson) writes:

> Anyways ... here it is ... the equation of interest is of the form:
>
> Vmax - 5*log(v) = a[m15-1.1] + b[m15-1.1]^2 + c
>
> I have a data file with Vmax, v, and m15 for a set of objects (about 40 of
> them), with uncertainties on each value.
> Having read those entries in, what I want to do is fit the above
> functional form, deriving a, b, and c, as well as their associated
> uncertainties (i.e. a +/- sig(a), b +/- sig(b), and c+/-sig(c)), and the final
> dispersion (and maybe reduced chi-squared) of the best fit quadratic.
>
> Now .. I can see various routines which get me part-way there, but they either
> only provide a,b, and c without uncertainties, or only provide the
> uncertainties for a linear fit (e.g. fitexy). Basically what I'd like is a
> quadratic version of fitexy (i.e., sigmas on all returned coefficients+
> dispersion of fit+reduced chi-square).


How about POLYFITW, or SVDFIT? They both return errors on the fit
coefficients. So you just fit to the dependent variable
y = (Vmax - 5*log(v) ) +- sqrt(sigma^2(Vmax) + 25*sigma^2(v)/v^2)

Hmm...you have errors on m15 too. Is this your question? It's common
to ignore those in the fit, if it's not obvious they are the dominant
error. Lupton's book section 11.7 discusses the problem for linear
fits.

Mark Fardal
UMass
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Plotting double precision (seg fault)
Next Topic: [Q] XInteranimate

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

Current Time: Fri Oct 10 14:06:51 PDT 2025

Total time taken to generate the page: 0.47562 seconds