Login

Recoding Variables in SPSS Statistics (cont...)

Recoding data into two categories

Example: The data given below represents a satisfaction rating out of 10 for a new service offered by a company. The company would like to code all those who responded by giving ratings above 5 a "Satisfactory" code and those below 5 a "Dissatisfactory" code.

Satisfaction scores for a new service
Scores 3 6 8 9 7 2 10 6 4 8 9 3
Testimonials
TAKE THE TOUR


  1. Enter the data in the SPSS Statistics Data Editor and name the variable "Ratings".
    Remember that each individual's results go on a separate line (row) in SPSS Statistics.
    Recoding Variables in SPSS

    Published with written permission from SPSS Statistics, IBM Corporation.

  2. Click on Transform > Recode Into Different Variable... in the top menu.
  3. Transfer the variable you want to recode by selected it and pressing the SPSS Right Arrow Button button, and give the new variable a name and label. In this example, we have given the new variable a name of "NRatings" and label of "New Ratings" as shown below:
    Recoding Variables in SPSS

    Published with written permission from SPSS Statistics, IBM Corporation.

  4. Click on the SPSS Change Button button.
  5. Click on the SPSS Old and New Values Button button.
  6. Enter the value of "5" into the Range, LOWEST through value: box within the –Old Value– area, and set the new code to "1" into the Value: box within the –New Value– area. Click the Output variables are strings checkbox so that it will except values that are not numbers. You need to increase the Width: from 8 to 16 also, so that the string labels are not truncated.
    Recoding Variables in SPSS

    Published with written permission from SPSS Statistics, IBM Corporation.

  7. Click on the SPSS Right Arrow Button button.
  8. Enter the value of "6" into the Range, value through HIGHEST: box within the –Old Value– area, and set the new code to "1" into the Value: box within the –New Value– area.
    Recoding Variables in SPSS

    Published with written permission from SPSS Statistics, IBM Corporation.

  9. Click on the SPSS Add Button button.
  10. Click on the Continue button.
  11. You will have returned to the previous screen and will now have to click on the SPSS OK Button button. This will take you to the Data View Editor, which will now show that you have created a new variable that is based on recoding your existing variable:
    Recoding Variables in SPSS

    Published with written permission from SPSS Statistics, IBM Corporation.

Join the 10,000s of students, academics and professionals who rely on Laerd Statistics.TAKE THE TOUR
« prev