You are on page 1of 10

5

Chapter
S P S S M A N U A L

Recoding SPSS Data


Often, you do not need the accuracy of ratio or interval level data.
In this case, you can use the recode procedure to generate new
variables based upon survey data.

S
uppose we ask survey respondents to write down their exact age. We may have
responses from teenagers to octogarians. Although this information is
important, it may be too cumbersome to work with in many statistical tests.
You may decide to condense ratio data into interval or ordinal groups. This
example uses the “age” variable in the GSS91 (SPSS
Student Assistant)

Recoding is usually used to change higher-level data into


lower-level data. Although you can move downwards with
data, you can never move upwards. Lower-level data can
never become higher-level data.

Performing a recode procedure.


First, print out the frequency table for the variable that you want to recode. Table 5.1
represents the frequency table for the variable “age.” As you can see, we have
respondents from 19 years of age to 70.

Let’s decide on the following recode of the variable:

Ages 19-29 will be recoded into a new variable and labeled young adults
Ages 30-50 will be recoded into a new variable and labeled middle-age adults.
Ages 51-70 will be recoded into a new variable and labeled older-adults.

31
S P S S M A N U A L

Performing a Recode Procedure


First, go to the Transform option on the toolbar, then choose Recode and then Into
Different Variables, see Figure 5.3. Then, click on the variable that you want to
recode.

Figure 5.3 Recode

Warning:
If you select “Into Same Variable” your
original data will be permanently changed. It
is always safe to recode “Into Different
Variable.”

Select the arrow and move the variable to the box under Numeric Variable. You can
only recode one variable at a time. In the Output Variable section, you need to create a
new 8-digit variable name and label. As you can see in Figure 5.4, the new variable is
called “newage” and the label is “condensed age variable.”

Fig. 5.4

32
S P S S M A N U A L

Old and New Values Recoded


Select Old and New Values, then Figure 5.5 appears, this is where you will perform the
actual recoding procedure.

Figure 5.5 Recode Dialog Box

Under the old value you have a few options. They are as follows:

• Value: select one value for recoding

• Range: select a range of values for recoding

• Range Lowest Through: select all the numbers below and including a specified
number

• Range Though Highest: select all the numbers above and including a specified
number

• All other values: used to declare missing values

Recall the following recodes:

19-29 will be recoded into newage and labeled young adults


30-50 will be recoded into newage and labeled middle-age adults.
51-70 will be recoded into newage and labeled older-adults.

33
S P S S M A N U A L

TABLE 5.1 AGE OF RESPONDENT (PARTIAL OUTPUT)


Frequency Percent Valid Cumulativ
Percent e Percent
Valid 18 3 .2 .2 .2
19 8 .5 .5 .7
20 18 1.2 1.2 1.9
21 37 2.5 2.5 4.4
22 35 2.3 2.3 6.7
23 28 1.9 1.9 8.6
24 23 1.5 1.5 10.2
25 27 1.8 1.8 12.0
26 33 2.2 2.2 14.2
27 28 1.9 1.9 16.0
28 33 2.2 2.2 18.2
29 27 1.8 1.8 20.0
30 35 2.3 2.3 22.4
31 35 2.3 2.3 24.7
32 44 2.9 2.9 27.7
33 38 2.5 2.5 30.2
34 35 2.3 2.3 32.5
35 55 3.7 3.7 36.2
36 35 2.3 2.3 38.5
37 32 2.1 2.1 40.7
38 36 2.4 2.4 43.1
39 35 2.3 2.3 45.4
40 36 2.4 2.4 47.8
41 36 2.4 2.4 50.2
42 30 2.0 2.0 52.2
43 33 2.2 2.2 54.4
44 30 2.0 2.0 56.4
45 22 1.5 1.5 57.9
46 12 .8 .8 58.7
47 27 1.8 1.8 60.5
48 29 1.9 1.9 62.5
49 22 1.5 1.5 63.9
50 20 1.3 1.3 65.3
51 15 1.0 1.0 66.3
52 20 1.3 1.3 67.6
53 14 .9 .9 68.5
54 18 1.2 1.2 69.7
55 16 1.1 1.1 70.8
56 12 .8 .8 71.6
57 17 1.1 1.1 72.7
58 18 1.2 1.2 73.9
59 15 1.0 1.0 74.9
60 16 1.1 1.1 76.0
61 19 1.3 1.3 77.3
62 16 1.1 1.1 78.4
63 18 1.2 1.2 79.6
64 15 1.0 1.0 80.6
65 18 1.2 1.2 81.8
66 13 .9 .9 82.6
67 18 1.2 1.2 83.8

34
S P S S M A N U A L

3 Step Recoding Process

Figure 5.6, 3 Step Recode

• Step 1: Place the values that you want to recode into the appropriate options under
Old Value, see Figure 5.6.
• Step 2: You need to place the corresponding new value in the box.
• Step 3: Select add; the old value with its new value will appear in the box on the
right.
I M P O R T A N T N O T E S

1. If I entered a number, such as 19, in the option Range Lowest Through, that
range would include all possible ages up to and including 19.
2. If I entered a number, such as 71, in Range Though Highest, that range would
include all possible ages beginning from 71.
3. After you are finished entering data, you should select all other values from the
old value options, then select system-missing from new values. Any values that
you failed to include in the recoding will be declared missing.
4. Figure 5.7 illustrates the completed recode.
5. When you are finished select Continue; you will be
back to Figure 5.4.
6. You must select Change, then OK, see Figure
5.8.
7. The new variable appears at the last column on the
SPSS spreadsheet.
Figure 5.8 Change Key

35
S P S S M A N U A L

Figure 5.7, Completed Recode

Figure 5.8 illustrates how the variable “newage”


corresponds to its original variable, “age.”

But, you’re not done


with the recode….
You still need to create new value labels for the new
variable. See Figure 5.9 and 5.10. Note that you
Figure 5.8 The New Variable simply need to double-click on the variable label,
“new age” in the data view screen. Once you are in
the variable view screen, simply left click in the box values.

Figures 5.9 and 5.10: Adding


Labels to New Variable

36
S P S S M A N U A L

Figure 5.11 Variable Labels Now Completed

Figure 5.11 above illustrates the value label box after all three age groups have been
added. Now, let’s look at the frequencies of our new variable below (Figure 5.12).
condensed age

Cumulative
Frequency Percent Valid Percent Percent
Valid young adults 52 21.0 21.6 21.6
middle age adults 147 59.3 61.0 82.6
older adults 42 16.9 17.4 100.0
Total 241 97.2 100.0
Missing System 7 2.8
Total 248 100.0

Please note that the new variable is now ordinal. Thus, the proper Univariate statistics
to obtain are the median and the mode. Also, you can obtain either bar or pie charts.
It is worth emphasizing again that you do not obtain a histogram for either nominal or
ordinal data.

Figure 5.12 Median and Mode of NewAge

37
S P S S M A N U A L

Age of Respondents
700

600

500

400

300

200
Frequency

100

0
young adults middle age adults older adults

NEWAGE
Source: GSS91 Survey

Title
Source

The Final Graphical


32
S P S S M A N U A L

Output

• Begin to think about using charts to summarize your findings.


• Don’t forget, every chart needs a title and a source (add these features in
the Chart Editor).

33
34

You might also like