To Lecture Notes
proc tabulate
Introduction
Note: table dimensions are separated by commas.
If only two dimensions are listed, they are the row and column dimensions.
If only one dimension is listed, it is the column dimension.
See the Drugstores Example.
The rts option specifies the row-title spacing.
If you want to keep missing data, add the missing option:
proc tabulate missing;
If addition to variable names, these keywords can be used in a table statement:
all max min mean median mode
n mniss pctn pctsum stdev sum
The all keyword adds a row, column, or page showing the total.
Within a dimension, variables and keywords can be concatenated, crossed, or grouped.
Example of concatenated items (connect concatenated items with spaces):
table product type all;
Cells from concatenated categories are placed adjacent to each other.
Example of crossed items (connect crossed items with *):
table mean * price;
Mean applies to all categories of price.
Example of grouped items (enclose grouped items in parentheses):
table pctn * (product type);
Here the grouping means that product and type are concenated first, then
crossed with pctn.
To change a header that corresponds to a variable name or keyword:
table mean = '' * sales = 'Mean Sales by Region', region='';
To change a header or table entry that corresponds to the value of
a variable, use a user defined format:
proc format;
value STATETYPE 1='Red'
2='Blue';
proc tabulate;
class state;
format state=STATETYPE.;
...
See the Boats and Treatments Examples.
Reference