BookmarkSubscribeRSS Feed
mariange8282
Obsidian | Level 7

Hi, I am having this warning:

 

WARNING: A total of 1327 of the 8672 observations in the DATA= data set were excluded (frequency sum = 7345).
 
I just would like to manage the frequency sum = 7345. Have that data in a variable. 
 
What I really want to do is if frecuency sum < 1000 (Example) then, ignore this  data. 
 
Any sugestions?
3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Use proc freq to get frequency counts?

Rick_SAS
SAS Super FREQ

Usually a message like this means that there are observations with missing values that were dropped from the analysis.  If you are using a FREQ statement, the WARNING tells you the sum of the frequencies for the observations that are dropped.

 

The easiest way to handle this is to pre-process the data to exclude observations that will be dropped. This is called restricting the data to "complete cases" or "listwise deletion." For ways to do this, see the artlcle "Complete cases: How to perform listwise deletion in SAS."

 

After you have filtered out the missing values, you can use PROC MEANS to count the remaining frequency count to decide if there is sufficient data left:

 

proc means data=CompleteCases sum;
var freq;
run;

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1575 views
  • 2 likes
  • 4 in conversation