home publications about webuse   members   contact

SDA Tutorial
Finding Variables
Running SDA
RECODING
Using Filters
Multiple Variables
Completed Tutorial

Download Report

Recoding or Regrouping Variables

The next column in the table indicates that of all non-missing GSS respondents, 45% use the Internet .  In other words, 45% of this sample use the internet, and the average weekly Internet time, counting both users and non-users is 4.2 hours.

To calculate the 45% we need to recode the netime measure to distinguish between respondents who do not use the Internet (55%), and those that do (46%)

For example, to recode netime in to two groups, respondents with zero hours of Internet use and respondents with more than zero of hours of Internet use, you use the following SDA code:

netime(r:0=0;1=1-90)

The "r:" instructs SDA that the variable is to be recoded.  Here, any value of netime equal to zero is recoded to zero, and any values between 1 and 90, including these extreme values are recoded to 1.  In other words, the value to the left of the equals sign is the new discrete category, and the values to the left define a range of values to be put into this group.

To determine this value (45%), we need to calculate an average, but an average of the zeros and ones.  The following graphic shows the required SDA form:

The steps include:

  • Open the SDA analysis page for Frequencies or crosstabulation.
  • type in the mnemonic netime in the "row" cell in the form along with the recode statement.
  • Select appropriate options using the checkboxes:
    • Statistics
    CHECKED
    • Suppress table
    CHECKED
    • Question text
    CHECKED
    • Color coding
    NOT REQUIRED HERE
    • Show T-statistic
    NOT REQUIRED HERE
  • Click on "Run the Table."

Click here to open a window to perform this analysis.

Follow the above steps, and you should see that the mean number of hours using the Internet is 45%.  Your second analysis is complete!

D/L Report] [Begin] [Find Variables] [Run SDA] [RECODING] [Filters] [Multiple Vars.] [End Tutorial]

Univ. of Maryland

Send us your comments/questions to: webuse@socy.umd.edu
© 2002, University of Maryland