Question about Spearman's correlation I want to measure the associations between a number of variables and all of them are measured on a ratio scale. If I am to run Spearman's correlation, can I just run it on the variables as is? Or do I have to rank them first?
So to give a simplistic example, if variable 1 is IQ score (subject 1 has a 100, subject 2 has a 150, and subject 3 has a 125) and variable 2 is GPA (subject 1 has a 3.1, subject 2 has a 2.9, and subject 3 has a 2.2). Can I just click the button to calculate Spearman’s rho based on these numbers… Or for each of the variables do I first need to assign ranks to each of the scores and then click the button to calculate Spearman’s rho on the ranks?
I've read online and it's not totally clear. In the link posted below gives an example using variables that are measured on a ratio scale (as mine is) and he/she seems to just be hitting the button to run the correlation without doing any sort of transformation to rank the data first (this person also happens to be using SPSS as I am).
https://statistics.laerd.com/spss-tutorials/spearmans-rank-order-correlation-using-spss-statistics.php
Based on this my guess is that since both of my variables are on a ratio scale, I can simply just run Spearman's on the variables as is without transforming them in any way. But I'm not sure. Any help with answering this question would be appreciated.
 A: As @Harvey Motulsky said, software will handle the ranking. But you will probably get the same results even if you rank the variables yourself first. Here is an example using cor.test() in R:
    x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
    y <- c( 2.6,  3.1,  2.5,  5.0,  3.6,  4.0,  5.2,  2.8,  3.8)
    
    # Converting to ranks
    df <- data.frame(x,y)
    df[] <- lapply(-df,rank,ties.method="min")
    
    # Raw values
    cor.test(x, y, method = "spearman")

        Spearman's rank correlation rho
    
    data:  x and y
    S = 48, p-value = 0.0968
    alternative hypothesis: true rho is not equal to 0
    sample estimates:
    rho 
    0.6 

    # Ranks
    cor.test(df$x, df$y, method = "spearman")

        Spearman's rank correlation rho
    
    data:  df$x and df$y
    S = 48, p-value = 0.0968
    alternative hypothesis: true rho is not equal to 0
    sample estimates:
    rho 
    0.6 

Although it does not really matter in this example, how you (and the software) handle the ties could make a difference.
A: Any program that purports to run the Spearman test will (presumably) do the ranking itself as a first step. The way to be sure with your program, is to run an example from a text.
