19CREATING CUSTOM REPORTS
Throughout the book, procedures such as PROC PRINT
and PROC FREQ
have been used to produce simple summaries of data. However, these procedures are limited. This chapter introduces two advanced reporting procedures that are designed to help you create professional reports.
19.1 USING PROC TABULATE
PROC TABULATE
is used to make summary data tables. Unlike PROC FREQ,
it can handle multiple levels in rows and columns. You can use PROC TABULATE
to create professional reports and publication ready tables. An abbreviated syntax for PROC TABULATE
is as follows:
PROC TABULATE <options>;
CLASS variables < / options>;
VAR variables < / options>;
TABLE <page> ,
<row> ,
column
< / options> ;
… other statements … ;
RUN;
Table 19.1 lists commonly used options for PROC TABULATE.
Moreover, Table 19.2 lists useful statements for PROC TABULATE.
Table 19.1 Common Options for PROC TABULATE
Option | Explanation |
DATA=dataname |
Specifies which data set to use |
OUT=dataname |
Specifies an output data set |
STYLE=styletype |
Specifies an ODS style format for the table |
FORMAT= |
Specifies a default overall format for each cell, Best 12.2 is the default |
ORDER=option |
Specifies order that categories are displayed. Options are UNFORMATTED, DATA, FORMATTED, and FREQ |
MISSING |
Specifies ... |
Get SAS Essentials: Mastering SAS for Data Analytics, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.