Doing More with SAS/ASSIST Software |
The Tabular Report item on the Report Writing menu enables you to
create tables in one of six styles. A tabular report presents descriptive
statistics in tabular format. The value in each table cell is calculated from
the columns and statistics that define the pages, rows, and columns of the
table. The statistic associated with each cell is calculated on values from
all rows in that category.
In the "Report Writing" chapter in
Getting Started with the SAS System Using SAS/ASSIST Software,
you learned to create a tabular report using the Simple Group 1 style. This
chapter describes the different tabular report styles and shows sample output
for each style. The techniques for selecting columns and statistics and for
generating output are the same for all styles. Additionally, this chapter
provides information on the Summarize option and Additional Options.
For additional information on creating tabular reports,
refer to the "Report Writing" chapter in
Getting Started with the SAS System Using SAS/ASSIST Software and to the
SAS Guide to TABULATE Processing.
Before creating a tabular report, there is some
terminology you
should understand.
An analysis
column is a numeric column whose values are used to calculate statistics.
A classification column is any
column, numeric or character, that you want to use to classify your data into
groups or categories of information. Classification columns can have character,
integer, or even decimal values, but the number of unique values should be
limited. Frequently, columns in a table have discrete values, but there are
so many different values that any breakdown by these values is meaningless.
You can reduce the number of classes by formatting ranges of values. See Creating a Format for information
on formatting ranges of values.
The Statistics style of tabular report is the simplest.
This style allows you to display statistics of your choice on any or all of
the numeric columns in your table. The following display shows a table containing
the MEAN, MIN, and MAX statistics for all the numeric variables in the HOUSES
table.
Statistics Report Output
The Simple Group 1 style of tabular report is similar
to the Statistics style, except that the calculated statistics are broken
down by one or more classification variables. The analysis variables are arranged
across the tabular report; each one is subdivided into the selected statistics.
The classification variables are arranged down the tabular report, with one
row of the tabular report for each value of the classification variable. The
following display shows a Simple Group 1 style of tabular report on the HOUSES
table:
Simple Group 1 Report Output
The Simple Group 2 style of tabular report is similar to the
Simple Group 1 style, except that you select statistics that go across the
tabular report and are subdivided by the analysis columns. With this style
of report, it is easier to compare the same statistic for different analysis
columns.
Simple Group 2 Report Output
The 2-D Group style of tabular report enables you
to create frequency tables, such as the one shown in the following display:
2-D Group Report Output
The Multiple Group style of tabular report is similar to the
Simple Group 1 style, except that you specify an additional classification
column to be arranged across the tabular report:
Multiple Group Report Output
The Advanced style of tabular report is the most flexible. You
can create any of the other report styles with the Advanced style. You build
your tabular report with up to five across levels and five down levels; each
level can contain one or more classification columns, analysis columns, or
statistics.
Advanced Report Output
When you select
Across items
or Down items in the Advanced
window, the Across Items or Down Items window opens, enabling you to select items for the different
levels. Selecting a Level button opens the Define Level window, which allows you to choose the type of
item (classification column, analysis column, or statistic). The types available
for a given level depend on how other levels have been defined:
- You cannot have two levels of analysis columns,
one under the other.
- You cannot have two levels of statistics, one
under the other.
If you select Drop level
in the Define Level window for a previously defined
level, the definition for that level is deleted, and lower levels are moved
up.
For all report styles except the Statistics style, you can add
a summary to the report. A summary provides statistics calculated for all
members of each classification column, as well as statistics for the table
as a whole, as in the following display:
Summarized Report Output
To add a
summary to a report:
- Select Summary. The Summarize window opens.
Summarize Window
- Select
Summarize.
- If desired, select Specify label to label the row with the summarized statistics. The
Label Summary window appears.
Label Summary Window
- Type a
label and select OK.
If you do not specify a label, the default label "Total" is used.
- Select OK to exit the
Summarize window.
Each report style has an
Additional Options
button, enabling you to further customize your report. The number of options
that are available vary from style to style. The following is a description
of all the possible options:
- Format columns: Use
this option to assign formats to the tabular report columns.
- Data order: Use this
option to specify the order in which the classification column values are
displayed.
- Row title space: Use
this option to specify the width of the column containing the row titles.
This number includes the vertical lines on the left and right.
- Label statistics: Use
this option to specify an alternative label for each statistic.
- Include missing values:
Use this option to include missing values as a member of the classification
column(s). If this option is set to NO, only nonmissing
values are used as classification members.
- Missing value text:
If Include missing values is set to YES, use this option to specify text to use to identify the
missing-value classification member.
- Label columns: Use
this option to assign alternative labels to the classification and analysis
columns.
- Default format: Use
this option to specify a default format for all values in the table. This
format is overridden on a per-column basis by any formats specified in Format columns.
- Form characters:
Use
this option to specify alternative symbols to use as vertical and horizontal
lines, corners, etc.
- Use separator lines:
Use this option to specify whether to display lines between the rows of the
tabular report.
- Maximum depth: Use
this option to specify the maximum number of levels for across or down items.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.