SUMMARY Procedure

Tips: Supports the Output Delivery System. For details, see Output Delivery System: Basic Concepts in SAS Output Delivery System: User's Guide.

You can use the ATTRIB, FORMAT, LABEL, and WHERE statements.

Full syntax descriptions are in Syntax .

Syntax

PROC SUMMARY <option(s)> <statistic-keyword(s)>;
BY <DESCENDING> variable-1<…<DESCENDING> variable-n>
<NOTSORTED>;
CLASS variable(s) </ option(s)>;
FREQ variable;
ID variable(s);
OUTPUT <OUT=SAS-data-set><output-statistic-specification(s)>
<id-group-specification(s)> <maximum-id-specification(s)>
<minimum-id-specification(s)></ option(s)> ;
TYPES request(s);
VAR variable(s)</ WEIGHT=weight-variable>;
WAYS list;
WEIGHT variable;

Table of Procedure Tasks

Statement Task
PROC SUMMARY Statement Compute descriptive statistics for variables across all observations or within groups of observations
BY Statement Calculate separate statistics for each BY group
CLASS Statement Identify variables whose values define subgroups for the analysis
FREQ Statement Identify a variable whose values represent the frequency of each observation
ID Statement Include additional identification variables in the output data set
OUTPUT Statement Create an output data set that contains specified statistics and identification variables
TYPES Statement Identify specific combinations of class variables to use to subdivide the data
VAR Statement Identify the analysis variables and their order in the results
WAYS Statement Specify the number of ways to make unique combinations of class variables
WEIGHT Statement Identify a variable whose values weight each observation in the statistical calculations