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

Add a Class Variable

After seeing the tables that we have built so far in this chapter, you are probably asking yourself, "Why use PROC TABULATE? Everything I’ve seen so far could be done with PROC MEANS."
One answer to this question is class variables. By specifying a variable to categorize your data, you can produce a concise table that shows values for various subgroups in your data. For example, it would be more interesting to look at mean income if it were broken down by the education level of the survey respondent. This is the third piece of the example table for this chapter.
To break down income by education level, we use EDUC as a class variable. Just as we used a VAR statement to identify our analysis variable, we use a CLASS statement ...
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