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
5 - Sorting Data and Selecting Cases
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
Once a data set is available within a project, it may be convenient to perform some operations on the values of one or more of the variables to either facilitate viewing the data or to prepare the data for later analysis. SAS Enterprise Guide classifies a variety of operations or manipulations of the data set as queries. Examples of queries include sorting data and selecting cases (covered in this chapter), recoding a variable in the data set (covered in Chapter 6), and computing a new variable (covered in Chapter 7).
Numerical example
We have constructed a simplified numerical example to illustrate sorting and selection. The data set is shown in Figure 5.1. Twenty-one experienced travel agents assigned identification codes of 1 to 21 (id in the data set) visited one of three comparably priced resorts managed by a particular resort company (coded under location in the data set). The travel agents rated the resorts on a variety of dimensions, with their composite evaluation shown under rating in the data set; higher values denote more positive evaluations.
Sorting data
At times it might be useful to sort the data in some systematic way. This helps us view the data and perhaps helps to anticipate what the data analysis will show in more detail. Currently, the data set is ordered by the identification codes of the travel agents primarily because this is the way the data were originally entered.
- Type
- Chapter
- Information
- Data Analysis Using SAS Enterprise Guide , pp. 43 - 52Publisher: Cambridge University PressPrint publication year: 2009