Skip to main content Accessibility help
×
Hostname: page-component-84b7d79bbc-l82ql Total loading time: 0 Render date: 2024-07-29T23:10:27.028Z Has data issue: false hasContentIssue false

5 - Sorting Data and Selecting Cases

Published online by Cambridge University Press:  05 June 2012

Lawrence S. Meyers
Affiliation:
California State University, Sacramento
Glenn Gamst
Affiliation:
University of La Verne, California
A. J. Guarino
Affiliation:
Alabama State University
Get access

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
Publisher: Cambridge University Press
Print publication year: 2009

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×