Help using Base SAS procedures

Individual Counts Supression

Occasional Contributor
Posts: 5

Individual Counts Supression



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 format;
value hide


proc freq data=mydataname;
table var1* var2 format=hide.;



Occasional Contributor
Posts: 11

Re: Individual Counts Supression

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.


suppresses the cumulative frequencies and cumulative percentages for one-way frequency tables and for frequencies in list format.

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


Valued Guide
Posts: 591

Re: Individual Counts Supression

Posted in reply to subobscure

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...

Occasional Contributor
Posts: 5

Re: Individual Counts Supression

Posted in reply to ChrisBrooks

Thanks for the information!  Perhaps using a macro to suppress the data might be better idea?

Super User
Posts: 13,498

Re: Individual Counts Supression

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 ;
Ask a Question
Discussion stats
  • 4 replies
  • 4 in conversation