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

Home » Public Forums » archive » regression with error bars
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: regression with error bars [message #70922 is a reply to message #70719] Sat, 22 May 2010 06:34 Go to previous message
Giuseppe Papa is currently offline  Giuseppe Papa
Messages: 27
Registered: February 2010
Junior Member
Hello,

Thank you for your reply and examples. I am a newbie to IDL and I've never used MPFIT. I read the tutorial from this website:
http://cow.physics.wisc.edu/~craigm/idl/mpfittut.html

and I wrote a pro to fit a line to x and y if we had errors in y only (+/-):

pro test

xval = [1,2,3,4,5]
yval = [1.2,1.9, 3.1, 4.5, 5]
errval = [0.1,0.001,0.1,0.05,0.2]

expr = 'P[0]+P[1]*X' ;line y=A+Bx

result = MPFITEXPR(expr, xval, yval,errval)

plot, xval, yval, psym=2
oplot, xval, result[0]+result[1]*xval

l=linfit(xval, yval) ;no errors considered
oplot, xval, l[0]+l[1]*xval, linestyle=1

end


Are the error values (errval) used in this way in the function MPFITEXPR? And if not, after I calculate the residuals using your method, how do I feed it into the function MPFITFUN ?

Thank you!!


---
frmsrcurl: http://compgroups.net/comp.lang.idl-pvwave/regression-with-e rror-bars
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: color plot over greyscale image - postscript
Next Topic: Re: how to retain header info even after writefits

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

Current Time: Wed Oct 08 19:24:50 PDT 2025

Total time taken to generate the page: 0.00351 seconds