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

Home » Public Forums » archive » Re: How to plot linear regression relation of two array?
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: How to plot linear regression relation of two array? [message #65032] Mon, 09 February 2009 15:09 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Feb 9, 3:21 pm, Hu <jha...@gmail.com> wrote:
> On Feb 9, 1:13 pm, Vince Hradil <vincehra...@gmail.com> wrote:
>
>
>
>> On Feb 9, 2:51 pm, Hu <jha...@gmail.com> wrote:
>
>>> On Feb 9, 12:12 pm, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>>> On Feb 9, 1:45 pm, Hu <jha...@gmail.com> wrote:
>
>>>> > Hi,
>
>>>> > I am trying to plot a linear regression relation of two array
>>>> > (supposing A and B) by using IDL. What I want is to got a chart like
>>>> > this link shows (the group is unable to post figure directly):http://serc.carleton.edu/images/introgeo/teachingw data/LeastSquaresGr...
>
>>>> > especially, How can I got the black straight line and the coefficients
>>>> > R^2  ?
>
>>>> > Thanks
>
>>>> Have you looked in the help for linfit()?
>
>>> BTW, I set MEASURE_ERRORS to SQRT(ABS(Y)), just follow the example,
>>> but what is MEASURE_ERRORS? and what is R^2 mean in the above picture?
>
>>> Thank you very much
>
>> Sounds like you're using REGRESS() not LINFIT()?
>
>> I'd use LINFIT() to get the nice line
>> and use CORRELATE() to get the Pearson correlation coefficient.  I
>> think CORRELATE() gives you the Pearson correlation coefficient, r,
>> which, in this case can be squared to get R^2.
>
> I use Linfit(), this function need a MEASURE_ERRORS parameter to run.
> Anyway, I will try your suggestion, CORRELATE()
>
> Tnaks

Oh right, I've just never used it. Maybe these will help?
http://en.wikipedia.org/wiki/Linear_regression
http://en.wikipedia.org/wiki/Coefficient_of_determination
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to plot linear regression relation of two array?
Next Topic: Re: Cursor in Mac OS X 10.5.6 w/X11 2.2.3 and 2.3.2

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

Current Time: Fri Oct 10 10:11:51 PDT 2025

Total time taken to generate the page: 1.43872 seconds