I. Text Summary
To go to the page where a task, programming feature, or concept was
presented, select a link.
Introduction
The FREQ procedure reports the
distribution of variable values, both as
percentages of a total and as counts of data. Output can appear as lists
or as crosstabulations in two-way and n-way tables.
Procedure Syntax
By default,
PROC FREQ lists the frequency, percentage,
cumulative frequency, and cumulative percentage of every variable (both character
and numeric) in the data set.
Selecting Variables
To specify the variables to analyze, include them in a
TABLES statement. Variables with repeating
values are the best choices for frequency tables.
Specifying Frequency Order
Normally, the FREQ procedure prints frequencies by the order of internal
values for each variable. To specify the order of the variable levels, include
the
ORDER= option:
-
ORDER=DATA orders values by appearance in the data
set
-
ORDER=FORMATTED orders by formatted value
-
ORDER=FREQ orders values by descending frequency
count
-
ORDER=INTERNAL orders by unformatted value (default)
Two-Way Tables
When a TABLES statement contains two variables joined by an asterisk (*),
PROC FREQ produces
crosstabulations. The resulting table displays
values for:
-
cell frequency
-
cell percentage of total frequency
-
cell percentage of row frequency
-
cell percentage of column frequency
N-Way Tables
Crosstabulations can include more than two variables. When
three or more variables are joined in a
TABLES statement, the result is a series of two-way tables that are grouped
by the values of the first variables listed.
List Output
To reduce the bulk of n-way table output, add a slash (/) and the
LIST option to the end of the TABLES statement. PROC FREQ will print compact,
multi-column lists instead of a series
of tables.
Suppressing Table Information
You can suppress the display of
specific statistics by adding one or more
options to the TABLES statement:
-
NOFREQ suppresses cell frequencies
-
NOPERCENT suppresses cell percentages
-
NOROW suppresses row percentages
-
NOCOL suppresses column percentages
|