# G96A Exercise 1

Exercises Using Data from the 1996 General Social Survey to Teach Transformations in SPSS

Edward E. Nelson and Elizabeth N. Nelson
California State University, Fresno

G96A Data

Note to the instructor: The data set used in this exercise is g96asp.por which is a subset of the 1996 General Social Survey. (Some of the variables in the GSS have been recoded to make them easier to use and some new variables have been created.) This exercise focuses on RECODE, COMPUTE, IF, and SELECT IF in SPSS. The exercises were written to accompany SPSS for Windows Version 7.5: A Basic Tutorial, by Richard Shaffer, Edward Nelson, Nan Chico, John Korey, Elizabeth Nelson, and Jim Ross. The ISBN is 0-07-366023-X. There is a version of this book (with accompanying data disk) currently available for SPSS 6. To order this book, call McGraw-Hill at 1-800-338-3987. The ISBN is 0-07-913673-7. You have permission to use this exercise and to revise it to fit your needs. Please send a copy of any revision to the authors.

Authors:
Ed Nelson and Elizabeth Nelson
Department of Sociology
California State University, Fresno
Fresno, CA 93740

Phone:
209-278-2275 (Ed) and 209-278-2234 (Elizabeth)

Email:
ednelson@csufresno.edu and/or elizn@csufresno.edu

Recode

1. There are two variables that refer to the highest year of school completed by the respondent's mother and father (MAEDUC and PAEDUC). Do a frequency distribution for each of these variables. Now recode each of them (into same variable) into three categories: under 12 years of school, 12 years, and over 12 years. Create new value labels for the recoded categories. Do a frequency distribution again to make sure that you recoded correctly.
2. INCOME91 is the total family income. Do a frequency distribution to see what the variable looks like before recoding. Recode (into a different variable) into eight categories: under \$10,000, \$10,000 to \$19,999, \$20,000 to \$29,999, \$30,000 to \$39,999, \$40,000 to \$49,999, \$50,000 to \$59,999, \$60,000 to \$74,999, and \$75,000 and over. Call this new variable INCOME1. Create new value labels for the recoded categories. Do another frequency distribution to make sure you recoded correctly. Now recode INCOME91 again (into a different variable). This time use only four categories: under \$20,000, \$20,000 to \$39,999, \$40,000 to \$59,999, and \$60,000 and over. Call this new variable INCOME2. Create new value labels for the recoded categories. Do another frequency distribution to make sure you recoded correctly.

Compute

1. There are five variables that measure tolerance for letting someone speak in your community who may have very different views than your own (SPKATH, SPKCOM, SPKHOMO, SPKMIL, and SPKRAC). For each of these variables, 1 means that they would allow such a person to speak and 2 means that they would not allow it. Create a new variable (call it SPEAK) which is the sum of these five variables. This new variable would have a range from 5 (would allow a person to speak in each of the five scenarios) to 10 (would not allow a person to speak in any of the five scenarios). Do a frequency distribution for this new variable to see what it looks like.
2. There are several variables dealing with opinion on abortion. Create a new variable called AB1 which is the sum of ABDEFECT, ABHLTH, and ABRAPE. For each of these variables, 1 means that they would approve of a legal abortion under the particular scenario and 2 means they would not approve. This new variable will have a range from 3 (would approve in all three scenarios) to 6 (would disapprove all three times). Do a frequency distribution for this new variable to see what it looks like.

If

1. There are two variables that describe the highest educational degree of the respondent's father and mother (PADEG and MADEG). Create a new variable (call it MAPAEDUC) that indicates if the father and mother have a college education. This variable should equal 1 if both parents have a college education, 2 if only the father has a college education, 3 if only the mother has a college education, and 4 if neither parent has a college education. Create new value labels for the recoded categories. Do a frequency distribution for this new variable to see what it looks like.
2. One variable indicates how often the respondent prays (PRAY) and another variable indicates if the respondent approves or disapproves of prayer in the public schools (PRAYER). Create a new variable (call it PRY) that is a combination of these two variables. This variable should equal 1 if the respondent prays a lot (once a day or several times a day) and approves of prayer in the public schools, 2 if the respondent prays a lot and disapproves of prayer in the schools, 3 if the respondent doesn't pray a lot and approves of prayer in the schools, and 4 if the respondent doesn't pray a lot and disapproves of prayer in the schools. Create new value labels for the recoded categories. Do a frequency distribution for this new variable to see what it looks like.

Select If

1. Select all males (1 on the variable SEX) and do a frequency distribution for the variable FEAR (afraid to walk alone at night in neighborhood). Then select all females (2 on the variable SEX) and do a frequency distribution on FEAR. Are males or females more fearful of walking alone at night?
2. Select all whites (1 on the variable RACE) and do a frequency distribution for the variable PRES92 (did they vote for Clinton, Bush, or Perot in 1992?). Then select all blacks (2 on the variable RACE) and do a frequency distribution on PRES92. Were whites or blacks more likely to vote for Clinton