Skip to Main Content
PROC TABULATE by Example, Second Edition
book

PROC TABULATE by Example, Second Edition

by Lauren Haworth Lake, Julie McKnight
May 2015
Intermediate to advanced content levelIntermediate to advanced
348 pages
11h 31m
English
SAS Institute
Content preview from PROC TABULATE by Example, Second Edition

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS 9.4 Language Reference, 6th Edition

SAS 9.4 Language Reference, 6th Edition

SAS Institute

Publisher Resources

ISBN: 9781607649908