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

Home » Public Forums » archive » REGRESS Question
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: REGRESS Question [message #36722 is a reply to message #31982] Wed, 22 October 2003 03:44 Go to previous messageGo to previous message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
In article <932b9720.0310210627.f93c6f2@posting.google.com>, "Kevin M.
Lausten" <kevinlausten@hotmail.com> wrote:


> I am having difficulty working with the REGRESS function. I continually
> get values <1 for my slope when doing a regression between two vectors.
> When I do a regression mapping y to x (slope = regress(x, y, const =
> const)) and when I do a regression mapping x to y (slope = regress(y, x,
> const = const) I get a slope<1 for both calculations. Shouldn't the
> y=mx+b of these two regressions be inverses of each other (leading to
> one slope>1, and one<1?) Maybe I am misunderstanding regressions?
> Thanks,
> kevin

Hi,

If you try the regression with the simplest possible straight line

y = mx +c

where m=1 and c=0 , so

y=x

if you regress with y=f(x), you get a value of 1 (and a constant of 0)
if you regress with x=f(y), you get a value of 1, again.

if the gradient is negative for y=f(x), it has to be negative for x=f(y).
The two equations you are assuming in the regressions are

y= mx + c OR x = (y-c)/m = ny + d

n=1/m, so sign is preserved. (and d=-c/m = -cn)


HTH

Chris.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Programming Techniques, 3rd edition
Next Topic: Reading fortran

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

Current Time: Sun Oct 12 17:27:42 PDT 2025

Total time taken to generate the page: 1.99115 seconds