Modify Variable Labels

Overview

When we put variables in our tables, PROC TABULATE adds labels for the appropriate rows or columns that indicate which variable is being displayed where. But variable names are not always very descriptive. The variable name OCCUP might be clear to you, but people reading your table might be confused by this cryptic label. A better approach is to use a descriptive label for your variable. There are two ways to do this. You can use the LABEL and KEYLABEL statements, or you can use the TABLE statement.

Using the LABEL Statement

The first way to add labels to your variables is by using a LABEL statement just like you can in any other procedure. In the following example, three of the variables in the table are assigned ...

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.