# Rank Comparisons

#### MsfStl

##### New Member
Hi,

First, thanks in advance for taking the time to look at this. Ok, here goes.
I have an interview that lists 12 reasons for why respondents wanted to be in the study; SR1 - To Get Paid, SR2 - To Learn Something, SR3 - To Talk To Someone, SR4 - To Stay Out Of Jail, SR5 - To Get Condoms, etc. Once the list of reasons had been given we asked the respondents to rank the reasons from 1 to 12 with 1 ="the Most important" and 12 = "the Least important", also if a respondent stated that two reasons were equally important we would give those a tie value (e.g., If SR2 and SR3, 'to learn something' and 'to talk to someone', were both equally the most important reasons then we would rank those both '1'), additionally, if any reasons did not fall into a rank at all then we coded that reason a '95'.

So, each reason can have a value of 1-12, or 95. Now, I want to set these reasons in the frequency rank as the respondents gave them. I am using SAS to run my frequencies, so any responses given with SAS in mind would be of great help.

My thought is to basically look at the twelve ranks individually, by creating a variable that will be dichotomous (y/n) and then taking the distribution of those who said yes for each frequency. For example: I create a variable called SR1_1 and if Sr1 = 1 then SR1_1 = 1 else SR1_1 = 0, likewise for SR2_1, if SR2 = 1 then SR2_1 = 1 elseif SR2 not equal 1 then SR2_1 = 0. I do this for each rank across each reason. Then I take, yet another new variable Call it Rank1, If Sr1_1 = 1 then Rank1 = 1, If SR2_1 = 1 then Rank1 = 2, etc. Once I have run through the list, I run a frequency on each rank and look at the distributions to determine the overall rank. Such that, say the distrubution for Rank1 in descending order for 100 respondents was {4(50),2(20),3(5),7(5),12(5),1(4),11(4),9(2),8(2),5(1),10(1),6(1) } then Reason 4 would be the most prevelant reason to be ranked number 1 and a simple histogram will show that. I do the same across all twelve ranks and I have an order of ranking for the 12 reasons.

Thats what I have set up, but as I am setting it up, I am beginning to question myself if I am going about this correctly. Do I concern myself with, say using the above example for Rank1, what if in Rank2, Reason 2 had the most numerous count with 19 and the remaining 11 reasons had less. Does it matter that while 2 has the highest count for Rank2 but not for Rank1 because Reason 4 had n=50, actually more people chose reason2 for Rank 1 than Rank2? Or am I complicating the issue and should just keep it simple? Any thoughts on the proper way to look at this would be appreciated, I am guessing there are probably several ways I could do this.

Again thanks for any feedback on this issue.

#### JohnM

##### TS Contributor
I would start with some simple outputs and graphs:

(a)
first, simply count the number of times each "SR" was ranked at all - if they're equal or very close, then you can compare rank sums - if they're not equal or close, then just compare average ranks

(b)
then, for each SR, do a histogram of the ranks and compare them side-by-side (or top-to-bottom)

(a) and (b) together should be enough for you to reach some tentative conclusions, or at least point you toward them - if you see anything interesting in (a) or (b), then go into more detail...