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 #65040 is a reply to message #65033] Mon, 09 February 2009 13:21 Go to previous messageGo to previous message
Hu is currently offline  Hu
Messages: 35
Registered: January 2009
Member
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
[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 23:05:38 PDT 2025

Total time taken to generate the page: 0.72410 seconds