- March 31, 2021 at 1:02 am #49379
Specifically used for Categorical variables as it can be summarized using a frequency table.
PROC FREQ < options > ;
TABLES requests < / options > ;
BY variables ;
WEIGHT variable < / option > ;
TEST options ;
EXACT statistic-options < / computation-options > ;
OUTPUT < OUT=SAS-data-set > options ;
Default output is – one way frequency tables.
contents are:- frequency, percent,cumutative frequency, cumutative percent
if tables statement is removed:- then we get one way freq table created for all the vars.
By statement – requirement- by vars should be sorted or indexed. use to group analysis results
to suppress statistics- tables a1 / nocum nopercent;
nlevels- to check distinct values, so used for checking duplicates
noprint- no displays of frequency counts (with table statement)
it will order is descending frequency so can also be used to check duplicates
uses of proc freq:-
1.chi square tests for one way to n-way tables.
2.test and measurement of agreement for contingency tables.
3.for data validation-provides all discrete values, with nlevels all distinct values, reports missing values.
proc freq data=xyz nlevels;
run;March 31, 2021 at 11:26 am #49381
proc freq data=xyz;
options- norow , nocolMarch 31, 2021 at 11:28 am #49382
proc freq data=xyz order=freq;
tables a1 / nocum nopercent;
- You must be logged in to reply to this topic.