Generate summary statistics for categories defined by the values of variables. Define multiple labels for some of the values, resulting in multiple representation of these values in the categories of the report.
Monthly Circulation Report -------------------------------------------------- ---------------------------------------- | | Items Circulated | | |--------------- ---------------------------------------| | | | | Young | | | | | Adult | Juvenile | People's |All Youth | Total | |---------------------------------+----------+---- ------+----------+----------+----------| |Books |Hardcover | 15816| 4311| 1084| 5395| 21211| | |----------------+----------+---- ------+----------+----------+----------| | |LargeType | 131| 1| 2| 3| 134| | |----------------+----------+---- ------+----------+----------+----------| | |Paperback | 4143| 3218| 712| 3930| 8073| | |----------------+----------+---- ------+----------+----------+----------| | |Total for Media | 20090| 7530| 1798| 9328| 29418| |----------------+----------------+----------+---- ------+----------+----------+----------| |Periodicals |LargeType | 9| 0| 0| 0| 9| | |----------------+----------+---- ------+----------+----------+----------| | |Magazines | 4162| 433| 134| 567| 4729| | |----------------+----------+---- ------+----------+----------+----------| | |Total for Media | 4171| 433| 134| 567| 4738| |----------------+----------------+----------+---- ------+----------+----------+----------| |All Print |Hardcover | 15816| 4311| 1084| 5395| 21211| |Material |----------------+----------+---- ------+----------+----------+----------| | |LargeType | 140| 1| 2| 3| 143| | |----------------+----------+---- ------+----------+----------+----------| | |Magazines | 4162| 433| 134| 567| 4729| | |----------------+----------+---- ------+----------+----------+----------| | |Paperback | 4143| 3218| 712| 3930| 8073| | |----------------+----------+---- ------+----------+----------+----------| | |Total for Media | 24261| 7963| 1932| 9895| 34156| |----------------+----------------+----------+---- ------+----------+----------+----------| |Audio |Audiocassettes | 1569| 546| 388| 934| 2503| | |----------------+----------+---- ------+----------+----------+----------| | |CompactDiscs | 2018| 0| 370| 370| 2388| | |----------------+----------+---- ------+----------+----------+----------| | |Total for Media | 3587| 546| 758| 1304| 4891| |----------------+----------------+----------+---- ------+----------+----------+----------| |Talking Books |Audiocassettes | 483| 343| 24| 367| 850| | |----------------+----------+---- ------+----------+----------+----------| | |CompactDiscs | 184| 10| 4| 14| 198| | |----------------+----------+---- ------+----------+----------+----------| | |Total for Media | 667| 353| 28| 381| 1048| |----------------+----------------+----------+---- ------+----------+----------+----------| |Video |DVD | 4854| 1142| 0| 1142| 5996| | |----------------+----------+---- ------+----------+----------+----------| | |Videocassettes | 6092| 3540| 0| 3540| 9632| | |----------------+----------+---- ------+----------+----------+----------| | |Total for Media | 10946| 4682| 0| 4682| 15628| |----------------+----------------+----------+---- ------+----------+----------+----------| |All Recordings |Audiocassettes | 2052| 889| 412| 1301| 3353| | |----------------+----------+---- ------+----------+----------+----------| | |CompactDiscs | 2202| 10| 374| 384| 2586| | |----------------+----------+---- ------+----------+----------+----------| | |DVD | 4854| 1142| 0| 1142| 5996| | |----------------+----------+---- ------+----------+----------+----------| | |Videocassettes | 6092| 3540| 0| 3540| 9632| | |----------------+----------+---- ------+----------+----------+----------| | |Total for Media | 15200| 5581| 786| 6367| 21567| |---------------------------------+----------+---- ------+----------+----------+----------| |Total Items Circulated | 39461| 13544| 2718| 16262| 55723| -------------------------------------------------- ---------------------------------------- |
The value of a report’s presentation can be enhanced by grouping categories in various ways and including these additional combinations in the report.
This example report shows one month’s circulation totals for a library. It organizes the totals according to the values of three classification variables: media, audience, and type.
The report includes all unique combinations of the three class variables. Additionally, the report combines some of the categories into new categories, resulting in multiple representation of specific categories in the report.
For example, the new category “All Youth” sums the circulation totals for the “Juvenile” and “Young People’s” classifications.
Each observation in the LIBRARIES data set corresponds to the total number of items circulated for a specific combination of media, audience, type, category, and subcategory.
A Closer Look |
The only procedures in SAS 9.1 that can process multiple labels are PROC MEANS, PROC SUMMARY, and PROC TABULATE. If you do not instruct SAS to use multiple labels within these three procedures, even if the format has been defined as multilabel, the feature is ignored. SAS also ignores any reference to a multilabel format in any procedure besides the three listed above.
It is important to understand what happens when you omit the MLF option in one of the three multilabel-enabled procedures, but you reference a multilabel format in the execution of the procedure. For example, if a value is multiply referenced in a PROC FORMAT VALUE statement, SAS uses only the value label associated with the first occurrence in the format definition. If the value is also included in a range and the range appears later in the format definition, you may see the range’s value label listed if your data set contains an observation with another value in that range. Note that if a value’s first occurrence is defined by a value label before the range that includes it is defined, that value is not represented in that range’s category.
Always use caution when interpreting reports that are based on multiple labels. The preceding example sums the analysis variable ITEMS. If you added up the cells in the rows labeled “Total for Media,” your sum would be greater than the value in the “Total Items Circulated” cell in the last row of the table. This is because of the multiple representation of values in the table.
When you write a VALUE statement in PROC FORMAT and do not include the MULTILABEL option, SAS looks for repeated ranges or overlapping values. If any are detected, the format is not created. Thus, if you submit the PROC FORMAT step in the preceding example with the MULTILABEL option omitted, SAS would not create the formats.
PROC FORMAT reference, usage information, and additional examples. See “The FORMAT Procedure” in the “Procedures” section of Base SAS 9.1 Procedures Guide.
PROC TABULATE reference, usage information, and additional examples. See “The TABULATE Procedure” in the “Procedures” section of Base SAS 9.1 Procedures Guide.
Working with Formats. See “Formats and Informats” in the “SAS Language Elements” section of SAS 9.1 Language Reference: Concepts.
18.189.171.86