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 (December 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 4 Dec 2010 23:30:58 -0800
Reply-To:     Daniel Nordlund <djnordlund@FRONTIER.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Daniel Nordlund <djnordlund@FRONTIER.COM>
Subject:      Re: pairwise deletion of missing values
In-Reply-To:  <201012050630.oB4Bkk06004719@willow.cc.uga.edu>
Content-Type: text/plain; charset="utf-8"

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Youngdeok Kim > Sent: Saturday, December 04, 2010 10:30 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: pairwise deletion of missing values > > Hi, I am trying to delete missing values in data set. > > for example, > > q1 q2 q3 > 10 20 30 > . 30 40 > 30 40 . > 40 50 60 > > Can you give me a good example using do loop? > > Thanks.

What do you mean by "trying to delete missing values"? Do you want to remove observations with any missing values, or do you want to replace missing values with some other value, or something else? Given your example data above, what do you want the final dataset to look like?

As a start, if you want to eliminate cases with at least one missing value, then something like this may get you going

data have; input q1 q2 q3; cards; 10 20 30 . 30 40 30 40 . 40 50 60 ; run;

data want; set have; if nmiss(of q1-q3) > 0 then delete; run;

If not, then write back to the list and tell us what you want the result to be for your sample data.

Hope this is helpful,

Dan

Daniel Nordlund Bothell, WA USA


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