Repeat a Table for a Series of Statistics
Sometimes you need to
produce a series of tables with the same variables and different statistics.
A table that shows means is interesting, but you might also want to
show a row percentage or maybe the mean plus the standard deviation.
To get started, we use the same basic code from the previous example:
TITLE "Original Table Showing Company Data"; PROC TABULATE DATA=TEMP; CLASS SECTOR FULLTIME GENDER; VAR NUMEMP; TABLE SECTOR, FULLTIME=' '*GENDER=' ' *NUMEMP=' '*MEAN=' '*F=8. / BOX="Mean Number of Employess"; RUN;
This time, instead of replacing the row variable with a macro variable, we replace the statistic. This is a little more complicated because we will also have to change the BOX label and the ...
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.