Date: Mon, 6 Nov 2006 00:10:39 -0800
Reply-To: repouser <sanketrepo@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: repouser <sanketrepo@GMAIL.COM>
Subject: Re: count the number of missing values
Content-Type: text/plain; charset="iso-8859-1"
for individual variables you can use the function missing()
if Missing(x1) = 1 then miss_cnt_x1 = miss_cnt_x1 + 1;
or for combined missing you can use:
if Missing(x1) and Missing(x2) and Missing(x3) then all_miss_cnt =
all_miss_cnt + 1;
A quick and dirty alternative is do a proc freq with missing option :
proc freq data= test;
tables x1 x2 x3 /missing;
this will tell you how many missing for each are there in data set ...
hope this helps....
> How can I get the number of missing values in a dataset. I mean,
> suppose there are dataset test with variables x1,x2, and x3. I would
> like to know how many missing values are there.
> Best regards,