Book contents
- Frontmatter
- Contents
- Acknowledgments
- About This Book
- How to Use This Book
- Chapter 1 Navigation
- Chapter 2 Preliminary Data Exploration
- Chapter 3 Storing and Manipulating Data
- Chapter 4 Advanced Concepts in Dataset and Variable Manipulation
- Chapter 5 Introduction to Common Procedures
- Chapter 6 Procedures for Simple Statistics
- Chapter 7 More about Common Procedures
- Chapter 8 Data Visualization
- Chapter 9 JMP as an Alternative
- Index
Chapter 8 - Data Visualization
Published online by Cambridge University Press: 05 June 2016
- Frontmatter
- Contents
- Acknowledgments
- About This Book
- How to Use This Book
- Chapter 1 Navigation
- Chapter 2 Preliminary Data Exploration
- Chapter 3 Storing and Manipulating Data
- Chapter 4 Advanced Concepts in Dataset and Variable Manipulation
- Chapter 5 Introduction to Common Procedures
- Chapter 6 Procedures for Simple Statistics
- Chapter 7 More about Common Procedures
- Chapter 8 Data Visualization
- Chapter 9 JMP as an Alternative
- Index
Summary
A SAS programmer is rarely limited to displaying data in only one way; various paths can be taken to produce similar tables and plots. Determining which procedure and graphical output are best for the task is a decision specific to the user and the needs of the project. When sharing results with a group, it may be necessary to include more than one representation in order to help everyone understand the data. The purpose of this chapter is to (1) illustrate a sampling of methods for creating output that is visually diverse yet conveys identical information, and (2) to describe how the Output Delivery System (ODS) can be used to maximize the utility of SAS data visualization tools by exporting SAS output to other software. In Chapter 6 we discussed creating tables and list-style output for both data management and processing purposes. In this chapter we take these tasks one step further using some of the same procedures in combination with ODS statistical graphics to create graphical style output. We will also discuss additional SAS procedures such as GCHART and GPLOT, which are designed specifically for plotting data.
USING THE OUTPUT DELIVERY SYSTEM (ODS)
In this chapter we will introduce the output delivery system (ODS) and the two ways we use this indispensable SAS feature. First, ODS statements can be used to export SAS output to specific destinations. The programmer can choose how and where SAS output is stored as well as has control over its format. Second, ODS Statistical Graphics can be used to create visually appealing and printer-friendly graphics.
EXAMPLE 8.1. Basic ODS Syntax.
Ods rtf file=‘C:\stats.rtf’;
Proc print data=sashelp.class;
Run;
Ods rtf close;
To ensure results are created in HTML format (output to the results viewer), go to tools > options > preferences > under the results tab and make sure the “create HTML” box is checked. Viewing in HTML is especially important when using the ODS graphics statement to create a plot, explained in Example 8.3.
CREATING PLOTS FROM PROCS
The FREQUENCY Procedure
The FREQUENCY procedure produces tables and listings. Output can be requested for one variable or for a combination of variables. Procedure options (i.e., TREND, MEASURES, CL) and additional statements (i.e., PLOTS) are used to create detailed output and graphics.
- Type
- Chapter
- Information
- Data Management Essentials Using SAS and JMP , pp. 108 - 121Publisher: Cambridge University PressPrint publication year: 2016