Week 4 Flashcards
PROC FREQ
Creates outputted results of one-way to multiple-way frequency and cross tabulation tables
PROC FREQ DATA = dataset;
BY var;
WHERE conditions;
OUTPUT = dataset;
RUN;
TABLES statement
Use TABLES statement to specify analysis
PROC FREQ DATA= dis;
TABLES var1 var2 / missing;
Run;
Options in the TABLES statement must appear after a slash
For two-way table
TABLES var1(row) * var2(column);
RUN;
Can nest variables with parentheses
TABLES var1 * (var2 —var4)
Double dash will use variables as they are listed in the dataset
3-way-table
TABLES var1(pages)var2(row)var3(column)
PROC FREQ statement options
PAGE- one table per page
NOPRINT
ORDER=
NOCOL
NOROW
NOPERCENT
NOCUM
LIST
MISSING - included missing values in analysis
MISSPRINT
OUT=
SAS dates
DATE9. Is an informant for 13JUL2024
Also MMDDYY10 = 07/13/2024
Can be added to INPUT line, separate FORMAT line or as a new variable