One–Dimensional Table

Let’s look at a basic model of PROC TABULATE that creates a count of observations by GENDER. This is a much simpler example than what is shown in Benefits of Using PROC TABULATE. The code here shows the GENDER variable in both the CLASS and TABLE statements:
PROC TABULATE DATA=CHPT01;
   CLASS GENDER;
   TABLE GENDER;
RUN;
What we see in Output 2.1 is that PROC TABULATE has given us a simple one–dimensional table with a column for every unique value of GENDER. The default statistic for class variables is the N statistic, or the count. In subsequent chapters, we will see how to improve the formatting and labels of the table. However, using all the defaults, you can see that PROC TABULATE has produced the table that we asked for. ...

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.