Book contents
- Frontmatter
- Contents
- Preface
- Acknowledgments
- I Introducing SAS Enterprise Guide
- II Performing Analyses and Viewing Output
- III Manipulating Data
- 5 Sorting Data and Selecting Cases
- 6 Recoding Existing Variables
- 7 Computing New Variables
- IV Describing Data
- V Score Distribution Assumptions
- VI Correlation and Prediction
- VII Comparing Means: The t Test
- VIII Comparing Means: ANOVA
- IX Nonparametric Procedures
- X Advanced ANOVA Techniques
- XI Analysis of Structure
- References
- Author Index
- Subject Index
6 - Recoding Existing Variables
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- Acknowledgments
- I Introducing SAS Enterprise Guide
- II Performing Analyses and Viewing Output
- III Manipulating Data
- 5 Sorting Data and Selecting Cases
- 6 Recoding Existing Variables
- 7 Computing New Variables
- IV Describing Data
- V Score Distribution Assumptions
- VI Correlation and Prediction
- VII Comparing Means: The t Test
- VIII Comparing Means: ANOVA
- IX Nonparametric Procedures
- X Advanced ANOVA Techniques
- XI Analysis of Structure
- References
- Author Index
- Subject Index
Summary
Overview
To recode a variable is to change the values of a variable. In the process of doing this, we create another variable to represent these changes. Recoding is typically performed to achieve one of two goals:
We may wish to modify or exchange the values of the variable. For example, items that are reverse worded in a survey must be realigned. Assume our inventory assesses self-esteem, with items rated on a 7-point scale with the anchor of 1 indicating not very true for me and the anchor of 7 indicating very true for me. Higher scores on the inventory reflect greater levels of self-esteem. Further assume that one of the several items on the inventory that is reverse worded reads, “I don't like myself.” Respondents with high levels of self-esteem should rate this item quite low, perhaps a 1 or 2, whereas those with low levels of self-esteem should rate this item relatively high, perhaps with a 5 or 6. Before combining this item with the other items (which are positively worded), it must be reverse scored such that 1s must be converted to 7s, 2s converted to 6s, and so on prior to combining items together. In this sense, the values of the item (a variable in the data set) must be recoded.
We may wish to consolidate codes or information. For example, each different ethnicity originally might be assigned a different code during data entry but we may need to combine individuals into ethnic groups for certain analyses. Thus, the ethnicity variable would have to be recoded.
- Type
- Chapter
- Information
- Data Analysis Using SAS Enterprise Guide , pp. 53 - 62Publisher: Cambridge University PressPrint publication year: 2009