Creating Two-Way Tables
As noted earlier, you often want statistics
for grouped data. It is possible to crosstabulate frequencies of two
or more variables. For example, census data is typically crosstabulated
with a variable that represents geographical regions.
The simplest
crosstabulation is a two-way table. To create a two-way table, join
two variables with an asterisk (*) in the TABLES statement of a PROC
FREQ step.
Syntax, TABLES statement
for crosstabulation:
TABLES variable-1
*variable-2 <*
... variable-n>;
|
When crosstabulations are specified, PROC FREQ produces tables with cells that contain the following ...
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.