Help using Base SAS procedures

How to print the observations that are deleted due to missing values in SAS?

Reply
New Contributor
Posts: 2

How to print the observations that are deleted due to missing values in SAS?

[ Edited ]

Hi,

 

When I used the proc surveylogistic in SAS, the number of observations deleted is larger than the number of obervations with missing values, so I want to print the excluded observations to check where is wrong with the data. I searched for several hours but did not find how to do that. Could anyone help me?

 

Many thanks!!

 

Miao

Super User
Posts: 17,801

Re: Could anyone help with how to print the observations that are deleted due to missing values in S

I don't think there's an easy way, but you could relatively easy move that into a proc print. 

proc print data=have;
where nmiss(numeric variable list)>0 or cmiss(character variable list)>0;
var numeric_variable_list character_variable_list;
run;
New Contributor
Posts: 2

Re: Could anyone help with how to print the observations that are deleted due to missing values in S

Thanks! I just found the reason is that I put more variables in the class statement than I put in the model statement, and SAS will remove all the observations with missing values in the class or model statement. That is why the number of observations deleted due to missing values is larger than the number of variables with missing values in the model.....  

Ask a Question
Discussion stats
  • 2 replies
  • 240 views
  • 0 likes
  • 2 in conversation