Calculating Spearman's Rho Value Matrix for 6x6 Matrix

  • Thread starter Thread starter swartzism
  • Start date Start date
  • Tags Tags
    Value
Click For Summary
SUMMARY

The discussion focuses on calculating the Spearman correlation matrix for a 15x6 matrix, aiming to replicate results from a specific white paper. The user initially confuses Spearman's rank correlation with Pearson's correlation, ultimately discovering that the matrix they were attempting to generate was actually the Pearson correlation matrix. The correct output for the 6x6 matrix is provided, confirming the calculations are now accurate.

PREREQUISITES
  • Understanding of Spearman's rank correlation coefficient
  • Familiarity with Pearson's correlation coefficient
  • Knowledge of matrix operations in statistical analysis
  • Experience with data manipulation in statistical software
NEXT STEPS
  • Research the "Iman and Conover" method for rank correlation
  • Learn how to implement Spearman's rank correlation in Python using libraries like SciPy
  • Explore matrix operations in R for statistical analysis
  • Review the white paper referenced for deeper insights into correlation matrices
USEFUL FOR

Data analysts, statisticians, and researchers interested in correlation analysis and matrix computations in statistical contexts.

swartzism
Messages
103
Reaction score
0
So I'm interested in calculating the Spearman correlation matrix, but I am running into some issues. All of the examples I have found only calculate rho scores between two columns. I am trying to replicate results from a white paper (http://www.tandfonline.com/doi/abs/10.1080/03610918208812265?journalCode=lssp20) and they generate a 6x6 correlation matrix T for a 15x6 matrix R. I cannot figure out how they do this!

I know how to calculate Pearson's correlation coefficient in matrix form by performing R'*R and working on the resultant 6x6 matrix, but Spearman's doesn't seem clear how to produce this T matrix.

Any help on how I would go about generating this Spearman rank correlation matrix would be greatly appreciated!
 
Physics news on Phys.org
The 15 x 6 matrix is matrix of sample data for 15 joint realizations of 6 random variables. The sample correlation matrix for 6 random variables is naturally 6 by 6.
 
I've also discovered that this is not a Spearman's rank correlation, although they claim it is. If you do the the Spearman's coefficient calculation between columns, you do not get the T matrix given. It is in fact the Pearson's coefficient matrix of R! I had a bug in my correlation calculation. I am now getting

1.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.09688 1.00000 0.00000 0.00000 0.00000 0.00000
-0.46671 -0.31292 1.00000 0.00000 0.00000 0.00000
-0.23352 0.07098 0.33767 1.00000 0.00000 0.00000
0.26142 0.48383 -0.19696 -0.04125 1.00000 0.00000
0.17479 -0.22700 0.19021 -0.02984 0.05223 1.00000

As expected.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
9K