Skip to content
Prev 7278 / 15274 Next

Ranks of Spearman's rank correlation coefficient

Dear Sirs,
I'm using cor() funcion with Spearman method to analyse correlation of timeseries. As you know Spearman method is based on ranks of timeseries, instead of their value. 

Well, what I'm not able to do is to extract the ranks of the timeseries used from cor() to compute the Spearman correlation coefficient (also called rho). 

For instance if I have this two timeseries
I obtain rho in this way
but how can I obtain ranks for the two timeseries? Of course, the same computed and used by previous cor().

Best,

Marco

____________________________________________________________
GET FREE 5GB EMAIL - Check out spam free email with many cool features!
Visit http://www.inbox.com/email to find out more!