SAS Freq
Contents
Usage
To display frequencies of variables, try:
proc freq data=LIBREF.TABLE order=freq; tables VARLIST; run;
To list unique values, add the nlevel option to the procedure.
Tables Statement
The TABLES statement creates a table for each variable specified in VARLIST.
To create a crosstab, try:
proc freq data=LIBREF.TABLE; tables VAR1*VAR2; run;
To suppress certain aspects of the frequency table, specify the corresponding supresion option. For example, to suppress cumulative frequencies, try:
proc freq data=LIBREF.TABLE order=freq; tables VARLIST / nocum; run;
The options are:
Option |
Meaning |
nocum |
suppress cumulative percentages |
nopercent |
suppress cell percentages |
norow |
suppress row percentages |
nocol |
suppress column percentages |
crosslist |
trigger nested list display for crosstabs |
list |
as above and includes first level value on each row |
By Statement
The BY statement specifies one or more variables for which the PROC FREQ should be split.