p_correlate [message #34018] |
Mon, 10 February 2003 08:29 |
Tim Osborn
Messages: 2 Registered: June 2002
|
Junior Member |
|
|
Dear IDL users,
I'm using IDL5.4 and have used P_CORRELATE to compute partial correlation
coefficents between vectors x and y while adjusting for the influence of a
third vector z (=="while holding z constant"). This seems to have worked
fine:
rxydotz = p_correlate( x , y , reform(z,1,n) ) ; n=vector length
and the results check out against an independent calculation.
However, I've also been using it when I want to "adjust for the influence"
of more than one vector, where z is now a 2D array with the first dimension
equal to the number of vectors whose influence I wish to remove, e.g.:
rxydotzz = p_correlate( x , y , reform(z,2,n) )
In all cases I've tried (about 8000 different sets of data) this has always
returned a positive value. I've looked at p_correlate.pro in IDL5.4, and
for cases where the first dimension is > 1 it returns a value that is a
square root of some other stuff - and hence always positive.
This doesn't seem right to me! Is this a known bug? Is it fixed in later
versions of IDL? Any other comments?
Cheers
Tim
Dr. Tim Osborn
t.osborn@uea.ac.uk
Climatic Research Unit
University of East Anglia
Norwich NR4 7TJ
UK
|
|
|