08-22-2017 10:11 PM
I am looking for a way to supress individuals counts when running proc freq. I used proc format and it suppress the individual count but it doesnt change the total and the row percents.
So far my code is
proc freq data=mydataname;
table var1* var2 format=hide.;
08-23-2017 05:22 AM
Use option NOROW and NOCOL to supress row counts and column counts.
TABLES var1*var2 norow nocol;
I couldn't get a clear idea as to what you wanted in your output.
However, the following are the options available:-
NOCOL suppresses the column percentages in cells of the crosstabulation table.
NOCUM suppresses the cumulative frequencies and cumulative percentages for one-way frequency tables and for frequencies in list format.
NOFREQ suppresses the cell frequencies for a crosstabulation table. This also suppresses frequencies for row totals.
NOPERCENT suppresses the cell percentages, the row total percentages, and the column total percentages for a crosstabulation table. For one-way frequency tables and frequencies in list format, suppresses the percentages and the cumulative percentages.
NOPRINT suppresses the frequency and crosstabulation tables, but displays all requested tests and statistics.
NOROW suppresses the row percentages in cells of the crosstabulation table.
You can consult the SAS documentation for more details and explanations
08-23-2017 06:59 AM
I suspect the OP is looking for disclosure testing in which case I think writing the Proc Freq output to a data set and then processing the output to adjust the totals is the only way to do it. Of course it may be easier just to omit the Proc Freq and do the whole thing in one pass...
08-23-2017 01:15 PM
Since you don't show any input data or what the result should look like this is a guess, only process data where both var1 and var2 are in the range of 1 to 5.
proc freq data=mydataname; where var1 in (1:5) and var2 in (1:5); table var1* var2 ; run;