Creating Summary Tables with the TABULATE Procedure |
Global Statement |
specifies a title. The argument n is a number from 1 to 10 that immediately follows the word TITLE, with no intervening blank, and specifies the level of the TITLE. The text of each title can be up to 132 characters long (256 characters long in some operating environments) and must be enclosed in single or double quotation marks.
TABULATE Procedure Statements |
PROC TABULATE <option(s)>; |
CLASS variable(s)</option(s)>; |
VAR analysis-variable(s); |
TABLE <<page-expression,> row-expression,> column-expression; |
You can specify the following options in the PROC TABULATE statement:
specifies the SAS-data-set to be used by PROC TABULATE. If you omit the DATA= option, then the TABULATE procedure uses the SAS data set that was created most recently in the current job or session.
specifies a default format for formatting the value in each cell in the table. You can specify any valid SAS numeric format or user-defined format.
considers missing values as valid values to create the combinations of class variables. A heading for each missing value appears in the table.
specifies the sort order that is used to create the unique combinations of the values of the class variables, which form the headings of the table. A brief description of each sort order follows:
orders values according to their order in the input data set.
orders values by their ascending formatted values. This order depends on your operating environment.
orders values by their unformatted values, which yields the same order as PROC SORT. This order depends on your operating environment. This sort sequence is particularly useful for displaying dates chronologically.
identifies class variables for the table. Class variables determine the categories that PROC TABULATE uses to calculate statistics.
considers missing values as valid values to create the combinations of class variables. A heading for each missing value appears in the table. If MISSING should apply only to a subset of the class variables, then specify MISSING in a separate CLASS statement with the subset of the class variables.
specifies the sort order used to create the unique combinations of the values of the class variables, which form the headings of the table. If ORDER= should apply only to a subset of the class variables, then specify ORDER= in a separate CLASS statement with the subset of the class variables. In this way, a separate sort order can be specified for each class variable. A brief description of each sort order follows:
orders values according to their order in the input data set.
orders values by their ascending formatted values. This order depends on your operating environment.
orders values by their unformatted values, which yields the same order as PROC SORT. This order depends on your operating environment. This sort sequence is particularly useful for displaying dates chronologically.
identifies analysis variables for the table. Analysis variables contain values for which you want to compute statistics.
defines the table that you want PROC TABULATE to produce. You must specify at least one TABLE statement. In the TABLE statement you specify page-expressions, row-expressions, and column-expressions, all of which are constructed in the same way and are referred to collectively as dimension expressions. Use commas to separate dimension expressions from one another. You define relationships among variables, statistics, and other elements within a dimension by combining them with one or more operators. Operators are symbols that tell PROC TABULATE what actions to perform on the variables, statistics, and other elements. The table that follows lists the common operators and the actions that they symbolize:
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.