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

Select the Right Denominator

The most confusing thing about complex tables with percentages is that there is no single correct denominator. There are many ways that you can set up the denominator. This example shows how to take a single TABLE statement and build a variety of different tables by swapping the denominator. Our starting point is the table from the previous example:
PROC TABULATE DATA=TEMP;
   CLASS GENDER CTRY CUSTTYPE SIZE;
   TABLE CTRY*GENDER, (CUSTTYPE SIZE)*PCTN;
RUN;
As we saw before, this code generates cell percentages. The actual denominator definition is as follows:
CTRY*GENDER*CUSTTYPE CTRY*GENDER*SIZE
But there are a number of other definitions that will work. There are also a number of definitions that will not work, as ...
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