Calculate and compare two correlations
calculate.and.compare.correlations.RdCalculate two correlation coefficients and test if they are statistically different (given the sample-sizes).
Arguments
- x1
 Vector of x-values for correlation 1
- x2
 Vector of x-values for correlation 2
- y1
 Vector of y-values for correlation 1
- y2
 Vector of y-values for correlation 2
- method
 What correlation method should be used? Currently only supports Spearman's rho
Note
I worry about the use of length(x1) and length(x2) in the code. We really need to be determining the number of jointly non-NA entries (since we set use = 'pairwise.complete.obs'). I think this would be something like length( x1[ !is.na(x1&y1) ] );