Put It All Together
Each of the tables shown
so far is useful, but the power of PROC TABULATE comes from being
able to combine several statistics or several variables (or both)
in the same table. PROC TABULATE does this by letting you specify
a series of tables within a single large table. We are going to combine
the tables that we built in the previous examples into a single table.
(See the sketch of this table at the beginning of the chapter.)
-
Create a table with one statistic. Begin with code that creates the first table, in Create a Table Showing the Number of Observations. The table shows the number of observations in the data set.
PROC TABULATE DATA=TEMP; VAR INCOME; TABLE INCOME*N; RUN;
-
Add a column to show the mean income. ...
Get PROC TABULATE by Example, Second 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.