Laerd Statistics LoginCookies & Privacy

Recoding Variables in SPSS

Introduction

The instructions below will show you how to recode variables. You can use recoding to produce different values or codes for a variable. Recoding can be done in one of two ways:

In this guide, we will concentrate on recoding into a different variable, for which there are 3 main types of recoding:

We will use an example of each type in order to demonstrate how to recode variables in SPSS.

TAKE THE TOUR

SPSS

Recode single values in SPSS

Example: The data given below represents runs scored by 5 batsmen in a national-level match. Recode the data so that the batsmen are rank ordered by their number of runs, with the batsman with the highest runs given a code of "1" and the batsman with the lowest runs given a "5".

  Number of runs by batsmen
Batsmen 1 2 3 4 5
Runs 86 120 56 10 18
Join the 1,000s of students, academics and professionals who rely on Laerd Statistics. TAKE THE TOUR
1 2 3