Compute the rank correlation between two vectors