Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In the last two videos we looked at ways that SPSS offers for recoding variables. For instance you can take a variable that comes in one particular form, like the words male and female, and recode it into another variable that has zeros and ones, an indicator variable that's useful in a lot of other analyses. Or we could do something called Visual Binning where we take ages and we create groups of ages to get, in this particular example, categories with approximately the same number of people, five categories or quintiles.
A third option that SPSS offers that I am going to talk about right now is a particularly popular one. It's called its ranking and all it is is ranking people from first to last on a particular variable. So for instance in this example I'm going to take the Age variable again and I'm going to rank people from the youngest to the oldest. Now what this does is it numbers people from first to last. Theoretically, it could number people from one to 349, because that's how many cases I have. However, we do have tied values, people with the same age, and I'll show you how SPSS deals with that when doing a recode by ranking scores.
What I am going to do is I am going to come up to Transform and come down to RankCases. Then I am going to pick the variable that I want, in this case it is Age, and move it over here. And you'll see you can do more than one at a time if you wanted. We could also get summary tables. You also get to decide whether you wanted the first place, the number one, to be the smallest or the largest value, and in this case I'm going to give the one to the youngest person, so I am going to leave it at the smallest value. However, there are several ways of dealing with rankings.
The number one is just a straight ahead normal Rank. So it would go from 1 to, for example, 349. On the other hand, we can also have something over here that's called a Fractional rank as a percentage, and this would be like percentiles. So if you've taken a test, you know that you can get into the 95th percentile. You don't even know what really the highest score is on, but you know where it stands relative to others. We can do the same thing with Age here. This would give people percentile scores on their age. Are they the oldest, youngest, in the 80th percentile, or so on.
Similarly, I have the option of creating Ntiles or quartiles or quintiles, like I did in the last one. I could have done this instead by telling it to create five equal groups. If I clicked on this one and put 5, it would do the five equal groups, which was sort of what I was doing in the last one. The Savage score and the Sum of rank cases as well as the Proportional estimates and Normal scores are rather sophisticated things, and I don't think that we need to get involved in these. I want to do the simplest form of ranking at this moment. So I am just going to leave it at Rank to default and press Continue, but I then need to decide what to do with tied scores.
I've got a few options. Number one is to give them the mean. So I have people tied for seventh, eighth, and ninth, it would give all of them a rank of eighth. Or I could have it give them all a rank of seventh or all a rank of ninth. And so there are a few different options. I think what I am going to do in this one is I am going to do them all as the lowest. So it will be ranking them by age categories in this particular example. The Mean would make sense in other ones, but for Age, I think assigning the tie to the lower score would be the better choice.
So I am going to press Continue. Now I also have an option of breaking things down by some other category. For instance I could do Gender, where I have people ranked as oldest to youngest for men and similarly for women. I am not going to do in this case, but that is an option. It would still create a single column of ranks. It's just I would need to separate them later by gender when I did them. So all I need to do now is press OK and it tells me that it has created a new variable from Age to Rank, and it's called RAge, R for Rank, Age, and it has a label on there. And if I go back to the data set, I can see it right here.
If I hover over that, I could see that it's called a Rank of Age, and then here I see the ranks. I can scroll up and down. I see that I don't need three zeroes. If I add average scores, I would probably need those. So what I am going to do is I am going to come back over to Variable view, go down to RAge, and just remove the three decimal places. And when I do that, I have everybody ranked from highest to lowest. In fact, if I want to verify how this works, I can just right-click on this and I can say Sort this ascending, so the lowest scores will be at the top.
And you see for instance, I have these people here all fall into these 30 and under group, which makes sense because they should be the youngest. As it goes up, I get people in the 40s to 61 to plus, and that is the highest group, and there is a confirmation that the rank performed the way I had intended it to. And so the ranking of cases is a third option for recoding, along with the manual recode that we did earlier, as well as the Visual Binning. And it can be a good way of making sure that your data both meet the assumptions of a statistical test, that they fall into a form that's easier to show in the graphs and analyses.
Ultimately, it makes the results easier to communicate with other people, which is the goal of a statistical analysis.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 76701 Viewers
80 Video lessons · 130883 Viewers
52 Video lessons · 64776 Viewers
59 Video lessons · 50605 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.