Basic SAS Procedures
PROC FREQ
- Produces frequency counts and cross tabulation tables.
- Can produce statistics to analyze relationships among variables.
- PROC FREQ can be controlled by four statements:
- PROC FREQ options;
- TABLES requests / options;
- WEIGHT variable;
- BY variable-list;
- Useful Options...
- Control the Output
- Order=Freq - sorts by descending frequency count (default is the unformatted value).
proc freq data=test order=freq;
tables X1-X5;
run;
|
- List - prints two-way to n-way tables in a list format rather than as cross tabulation tables.
proc freq data=test;
tables AGE*MAR/list;
run;
|
- Nocol - suppresses printing of column percentages of a crosstab.
Norow - suppresses printing of row percentages of a crosstab.
Nopercent - suppresses printing of cell percentages of a crosstab.
proc freq data=test;
tables AGE*MAR/nocol norow nopercent;
run;
|
- Request More Information
- Missprint - prints missing value frequencies for two-way to n-way tables.
proc freq data=test;
tables AGE*MAR/missprint;
run;
|
- Missing - interprets missing values as nonmissing and includes them in % and statistics calculations.
proc freq data=test;
tables AGE*MAR/missing;
run;
|
- Chisq - performs several chi-square tests.
proc freq data=test;
tables AGE*MAR/chisq;
run;
|
Another topic?
Questions or comments? If you are affiliated to the Carolina
Population Center, send them to
Phil Bardsley; non-affiliates may contact the author
Dan Blanchette.