Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Recoding by ranking cases

From: SPSS Statistics Essential Training (2011)

Video: Recoding by ranking cases

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.

Recoding by ranking cases

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.

Show transcript

This video is part of

Image for SPSS Statistics Essential Training (2011)
SPSS Statistics Essential Training (2011)

52 video lessons · 19375 viewers

Barton Poulson
Author

 
Expand all | Collapse all
  1. 2m 58s
    1. Welcome
      1m 5s
    2. Using the exercise files
      40s
    3. Using a different version of the software
      1m 13s
  2. 19m 0s
    1. Taking a first look at the interface
      11m 49s
    2. Reading data from a spreadsheet
      7m 11s
  3. 21m 54s
    1. Creating bar charts for categorical variables
      7m 18s
    2. Creating pie charts for categorical variables
      2m 54s
    3. Creating histograms for quantitative variables
      5m 45s
    4. Creating box plots for quantitative variables
      5m 57s
  4. 33m 10s
    1. Recoding variables
      5m 33s
    2. Recoding with visual binning
      5m 33s
    3. Recoding by ranking cases
      5m 26s
    4. Computing new variables
      5m 37s
    5. Combining or excluding outliers
      5m 21s
    6. Transforming outliers
      5m 40s
  5. 28m 12s
    1. Selecting cases
      6m 44s
    2. Using the Split File command
      5m 12s
    3. Merging files
      5m 33s
    4. Using the Multiple Response command
      10m 43s
  6. 22m 14s
    1. Calculating frequencies
      8m 43s
    2. Calculating descriptives
      5m 31s
    3. Using the Explore command
      8m 0s
  7. 16m 3s
    1. Calculating inferential statistics for a single proportion
      6m 6s
    2. Calculating inferential statistics for a single mean
      5m 39s
    3. Calculating inferential statistics for a single categorical variable
      4m 18s
  8. 30m 43s
    1. Creating clustered bar charts
      7m 10s
    2. Creating scatterplots
      5m 8s
    3. Creating time series
      3m 24s
    4. Creating simple bar charts of group means
      4m 17s
    5. Creating population pyramids
      3m 0s
    6. Creating simple boxplots for groups
      3m 3s
    7. Creating side-by-side boxplots
      4m 41s
  9. 45m 28s
    1. Calculating correlations
      8m 17s
    2. Computing a bivariate regression
      6m 27s
    3. Creating crosstabs for categorical variables
      6m 34s
    4. Comparing means with the Means procedure
      6m 33s
    5. Comparing means with the t-test
      6m 4s
    6. Comparing means with a one-way ANOVA
      6m 30s
    7. Comparing paired means
      5m 3s
  10. 24m 30s
    1. Creating clustered bar charts for frequencies
      6m 34s
    2. Creating clustered bar charts for means
      3m 45s
    3. Creating scatterplots by group
      4m 13s
    4. Creating 3-D scatterplots
      4m 25s
    5. Creating scatterplot matrices
      5m 33s
  11. 30m 57s
    1. Using Automatic Linear Models
      11m 52s
    2. Calculating multiple regression
      9m 3s
    3. Comparing means with a two-factor ANOVA
      10m 2s
  12. 29m 29s
    1. Formatting descriptive statistics
      6m 1s
    2. Formatting correlations
      7m 49s
    3. Formatting regression
      10m 19s
    4. Exporting charts and tables
      5m 20s
  13. 51s
    1. What's next
      51s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed SPSS Statistics Essential Training (2011).

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.