Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The FREQ Procedure

Syntax

The following statements are available in PROC FREQ.

PROC FREQ < options > ;
BY variables ;
EXACT statistic-options < / computation-options > ;
OUTPUT < OUT=SAS-data-set > options ;
TABLES requests < / options > ;
TEST options ;
WEIGHT variable ;

The PROC FREQ statement is the only required statement for the FREQ procedure. If you specify the following statements, PROC FREQ produces a one-way frequency table for each variable in the most recently created data set.

   proc freq;
   run;

The rest of this section gives detailed syntax information for the BY, EXACT, OUTPUT, TABLES, TEST, and WEIGHT statements in alphabetical order after the description of the PROC FREQ statement. Table 28.3 summarizes the basic functions of each statement.

Table 28.3: Summary of PROC FREQ Statements
Statement Description
BYcalculates separate frequency or crosstabulation tables for each BY group.
EXACTrequests exact tests for specified statistics.
OUTPUTcreates an output data set that contains specified statistics.
TABLESspecifies frequency or crosstabulation tables and requests tests and measures of association.
TESTrequests asymptotic tests for measures of association and agreement.
WEIGHTidentifies a variable with values that weight each observation.


PROC FREQ Statement

BY Statement

EXACT Statement

OUTPUT Statement

TABLES Statement

TEST Statement

WEIGHT Statement

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.