Add Statistics

Overview

Based on the mock up table, the statistics that you want to show are mean income and number of observations in the data set. To tell PROC TABULATE what statistic to display, you need to use the appropriate keyword. See Available Statistics for a list of the available statistics and their keywords. To show the mean statistic, use the MEAN keyword. To show the number of observations, use the N keyword.

Create a Table Showing the Number of Observations

To add a statistic keyword to a PROC TABULATE table, list the keyword right after the variable name in the TABLE statement. To tell PROC TABULATE that the statistic N should be applied to the variable INCOME, use an asterisk to link the variable name to the statistic keyword. ...

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.