Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Spearmans rho

  • 19-04-2007 12:13pm
    #1
    Closed Accounts Posts: 29,930 ✭✭✭✭


    Hi,

    I'm looking for a very simplistic example of how you would do this. It needn't be complex, in fact the very opposite - just something to show how it's done, where you get the values for each section, etc. I'm supposed to be doing one, but from just looking at an example that doesn't have an explanation alongside it I don't quite know where the values of X and Y are coming from...

    thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 1,845 ✭✭✭2Scoops


    Kind of hard to explain it in words but here goes…

    The Spearman correlation first reassigns each value in the two variables being correlated (X and Y) a rank score e.g. highest score gets 1, next highest, no matter how much higher, gets 2 etc.

    Then it calculates the difference of the 2 ranks (Xrank – Yrank). Then it squares the differences in rank and sums them.

    The equation is like this (excuse lack of scientific noation!):

    Spearman r = 1 – (6 by sum of squared rank differences) / n(n^2 – 1).

    It’s advantage is that it makes no assumption on the distribution of scores and can be used on ordinal data.

    X Y X-rank Y-rank D D^2
    6 9 3.5 4 -.5 .25
    5 8 5.5 5 .5 .25
    7 10 2 2 0 0
    8 10 1 2 -1 1
    2 4 10 8 2 4
    5 6 5.5 7 -1.5 2.25
    3 3 9 9.5 -.5 .25
    4 3 7.5 9.5 -2 4
    6 7 3.5 6 -2.5 6.25
    4 10 7.5 2 5.5 30.25

    Spearman = 1 - 6(48.5)/10(99)
    =.71


    Edit: can't get the table to come out right


  • Closed Accounts Posts: 29,930 ✭✭✭✭TerrorFirmer


    Thanks, appreciate it. But my problem arises when two values are the same - how does it work. I vaguely remember they both get 1.5 or something, but then there was also something about skipping the number '2' then, or something like that...but I can't remember. How do you assign the values of Y, if X is awarding 1 through 10 or whatever for highest values of X?


  • Registered Users, Registered Users 2 Posts: 1,845 ✭✭✭2Scoops


    If you can figure out that table I posted, I included examples. Every time there's a space, that's a new column. You seem to have it already though: when 2 numbers are the same they both get the same number, halfway between the two ranks, then the next number is skipped.

    Edit: overlooked one of your questions. You assign the ranks for Y exactly the same as those for X, give the highest rank to the highest value and so on. You will end up with 2 new variables of rank: X-rank and Y-rank, and then you correlate these instead of the original variables.


  • Closed Accounts Posts: 29,930 ✭✭✭✭TerrorFirmer


    Thanks. Much appreciated. :)


Advertisement