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

Home » Public Forums » archive » Confidence Bands
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Confidence Bands [message #77040] Mon, 25 July 2011 08:00
tbov89 is currently offline  tbov89
Messages: 1
Registered: July 2011
Junior Member
I'm wanting to plot the confidence bands (68% and 95%) to go along
with a polynomial fit I have. I have tried the yband keyword in
poly_fit but it does not seem to work how I expect it to. Here's my
code

PRO POLYTEST

x1=findgen(500)/10
y1=100+0.6*x1+0.1*x1^2+20*randomn(seed, n_elements(x1))
y1_err=y1*0.1

fit=poly_fit(x1, y1, 2, MEASURE_ERRORS=y_err, YBAND=yband, YFIT=yfit)
yupper68=yfit+yband
ylower68=yfit-yband

plot, x1, y1, psym=symcat(16), symsize=0.4
oplot, x1, yfit, color=cgcolor('red3'), thick=5
oplot, x1, yupper68, color=cgcolor('blu4'), thick=3
oplot, x1, ylower68, color=cgcolor('blu4'), thick=3

END

According to the poly_fit documentation, this should get the 1
standard-deviation errors (yupper68 and ylower68) however they barely
depart from the fit.

I found what I'm looking for here:
http://idlastro.gsfc.nasa.gov/idl_html_help/IMSL_MULTIREGRES S.html#wp974539
but the IMSL features are not included in my license. Is there a way
to make this work for poly_fit or something else?
[Message index]
 
Read Message
Previous Topic: Re: Loading Sorted Images into a 3D array
Next Topic: Re: Multiple Window

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

Current Time: Wed Oct 08 15:56:04 PDT 2025

Total time taken to generate the page: 0.00429 seconds