Repeat a Table for Various Time Periods - I
You can also use macros
to repeat the same table for various subsets of the data. For example,
you can run a table showing income figures for a particular month
or year.
As in the previous examples,
we start with a basic table. In this case, the table shows income
by sector and full-time status. The original table is run on all observations
in the data set:
PROC TABULATE DATA=TEMP; CLASS SECTOR FULLTIME; VAR INCOME; TABLE SECTOR=' ', FULLTIME=' '*INCOME=' '*MEAN=' '; TITLE "Mean Income (All Observations)"; RUN;
Output 13.7 shows
the results.
Output 13.7 Original Table Created without Macros
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.