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

Home » Public Forums » archive » Help: Weighted quadratic fitting under IDL?
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
Help: Weighted quadratic fitting under IDL? [message #19413] Tue, 14 March 2000 00:00
bgibson is currently offline  bgibson
Messages: 1
Registered: March 2000
Junior Member
This may be a highly trivial question, but it's one I'm having problems
dealing with under IDL. Perhaps I"m simply missing something obvious ..
regardless, I'd be indebted if someone could help me out. Heck, I'll even
throw in a nice acknowledgement in my next paper, if someone could point me to
a simple solution, or provide the requisite few lines of code!

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).

Obviously there is a nice way to do this without doing Monte Carlo
simulations, but anyone who could save me a few
hours of hacking code would become my instant hero(ine). Anyone?

Cheers,
Brad

--
Brad K. Gibson INTERNET: bgibson@casa.colorado.edu
CASA, University of Colorado PHONE: +1-303-492-6058
Campus Box 389 FAX: +1-303-492-7178
Boulder, CO, USA 80309-0389 http://casa.colorado.edu/~bgibson/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to remove For..Endfor loops in these case?
Next Topic: Re: Widget Button trigger through keypress?

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

Current Time: Sat Oct 11 13:05:55 PDT 2025

Total time taken to generate the page: 0.00980 seconds