Computing a New Variable

Now that you are getting into SPSS, I will try to stretch your understanding by introducing two other commands, RECODE and COMPUTE, that you can use to create your own variable from existing ones.

There are seven separate variables under the heading, Moral Values. For six of the seven, respondents were scored 1 if they said "yes" (e.g., believe in God) and 2 if they said "no."for the last question on Sexual Freedom, the scoring was somewhat differentand reversed in direction. Those who consistently said "yes" to the first 6 questions and "disagree" to the seventh might becalled "righteous" and those who consistently scored in the opposite direction might be termed "worldly"--with other response patterns in-between.

Suppose that you wanted to learn how citizens ineach country responded to all seven questions, not just one. Youcan use SPSS to create your own variable (let's call it Worldly)by reversing teh scoring for the Sexual Freedom variable and then summingthe responses over all seven variables. Between the GET FILE command andthe CROSSTABS command, insert a RECODE and a COMPUTE command as follows:

get file = '$CLASS/citizen.sav'.recode freesex (1=3) (3=1).
compute worldly= God + Aftrlife + devil + heaven + hell + freesex.
crosstabs worldly by nation/cells=col.

These commands will produce the new variable Worldly. It will range from 6 (most righteous) to 13 (most worldly). Here is the CROSSTABS printout from that run.

         WORLDLY  by  NATION  v01 NATION
                                         NATION  
           Col Pct | 
                   |United S Great Br West Ger France   East Ger
                   |tates    itain    many              many       Row
                   |     1  |     2  |     3  |     4  |     5  | Total
WORLDLY    --------+--------+--------+--------+--------+--------+ 
             6.00  |   4.8  |   2.2  |   3.3  |   2.2  |   1.2  |   159
                   |        |        |        |        |        |   3.0 
                  +--------+--------+--------+--------+--------+
             7.00  |  45.6  |  16.4  |  11.7  |  10.3  |   5.9  |  1115
                   |        |        |        |        |        |  20.8
                   +--------+--------+--------+--------+--------+
             8.00  |  19.4  |  12.4  |   9.4  |   7.0  |   3.7  |   612
                   |        |        |        |        |        |  11.4
                   +--------+--------+--------+--------+--------+
             9.00  |  12.2  |  14.4  |  13.2  |   8.7  |   5.2  |   592
                   |        |        |        |        |        |  11.1
                   +--------+--------+--------+--------+--------+
            10.00  |   7.3  |  14.7  |  16.2  |  14.7  |   6.5  |   611
                   |        |        |        |        |        |  11.4
                   +--------+--------+--------+--------+--------+
            11.00  |   6.5  |  14.3  |  18.6  |  24.4  |  18.1  |   806
                   |        |        |        |        |        |  15.0
                   +--------+--------+--------+--------+--------+
            12.00  |   2.6  |  15.1  |  13.3  |  17.6  |  18.8  |   657
                   |        |        |        |        |        |  12.3
                   +--------+--------+--------+--------+--------+
            13.00  |   1.5  |  10.3  |  14.3  |  15.0  |  40.7  |   803
                   |        |        |        |        |        |  15.0
                   +--------+--------+--------+--------+--------+
            Column    1500     1051     1088      712     1005     5355
             Total    28.0     19.6     20.3     13.3     18.8    100.0
         
         

As you can see, Americans emerge as far more righteous by the consistencyi n their responses patterns to this battery of questions. You might use the RECODE (if necessary) and COMPUTE commands to create new variables for environmental attitudes, gender-related issues, political support, and soon. Just make sure that you combine the variables in sensible ways. The computer has the capacity to transform dumb mistakes into huge fiascos. Just be thoughtful and careful in what you do.