BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ama220
Obsidian | Level 7

Hello,

 

I need to suppress categories with low frequency values (less than 10) from the output of proc freq. Any tips to me me out would be appreciated.

 

proc freq order= freq ; table outcome_coded

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Generally when I have such a requirement I send the output to a data set, which I then have for reference when the inevitable question comes back later, and just display the desired values in a report.

 

proc freq data=whatever order=freq noprint;
   tables outcome_coded / out=outcome_freqs outcum;
run;

Proc print data=outcome_freqs noobs;
   where count>10; /* or whatever limit*/
run;

The OUTCUM option means to include the cumulative count and percents. By default they do not appear in the out= data set.

 

 

Another approach if you want to show that the category existed but just suppress the count could be done but how you would address the percent values.

View solution in original post

2 REPLIES 2
ballardw
Super User

Generally when I have such a requirement I send the output to a data set, which I then have for reference when the inevitable question comes back later, and just display the desired values in a report.

 

proc freq data=whatever order=freq noprint;
   tables outcome_coded / out=outcome_freqs outcum;
run;

Proc print data=outcome_freqs noobs;
   where count>10; /* or whatever limit*/
run;

The OUTCUM option means to include the cumulative count and percents. By default they do not appear in the out= data set.

 

 

Another approach if you want to show that the category existed but just suppress the count could be done but how you would address the percent values.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 206 views
  • 0 likes
  • 2 in conversation