DATA Step, Macro, Functions and more

WARNING: (frequency sum=7345)

Posts: 23

WARNING: (frequency sum=7345)

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?
Super User
Posts: 6,938

Re: WARNING: (frequency sum=7345)

Which procedure gave you that warning? Please supply the code.

And is there something to identify the 1327 observations (missing values etc)?

Maxims of Maximally Efficient SAS Programmers
Super User
Super User
Posts: 7,401

Re: WARNING: (frequency sum=7345)

Use proc freq to get frequency counts?

Posts: 3,477

Re: WARNING: (frequency sum=7345)

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;


Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation