Hi,
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
1-5='*'
other=[comma8.];
run;
proc freq data=mydataname;
table var1* var2 format=hide.;
run;
Thanks!
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
https://v8doc.sas.com/sashtml/proc/zlesstmt.htm
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...
Thanks for the information! Perhaps using a macro to suppress the data might be better idea?
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.