LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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>
Organization: http://groups.google.com
Subject:      Re: count the number of missing values
Comments: To: sas-l@uga.edu
In-Reply-To:  <1162799896.595482.317910@i42g2000cwa.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi, for individual variables you can use the function missing() e.g: 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 : e.g: proc freq data= test; tables x1 x2 x3 /missing; run;

this will tell you how many missing for each are there in data set ... hope this helps....

hba2pd wrote: > Hello,. > > 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,


Back to: Top of message | Previous page | Main SAS-L page