Creating N-Way Tables
Overview
For a frequency analysis of
more than two variables, use PROC FREQ to create n-way
crosstabulations. A series of two-way tables is produced, with a table
for each level of the other variables.
For example, suppose
you want to add the variable Sex to your crosstabulation of Weight
and Height in the data set Clinic.Diabetes. Add Sex to the TABLES
statement, joined to the other variables with an asterisk (*).
tables sex*weight*height;
Determining the Table Layout
The order of the variables
is important. In n-way tables, the last two variables of the TABLES statement become the two-way rows and columns. Variables that precede the last two variables in the TABLES statement stratify the crosstabulation tables. ...
Get SAS Certification Prep Guide, 4th 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.