Date: Mon, 17 Mar 2008 21:03:54 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: how to correct this program. Thanks!
Given the latest definition of your problem, I still recommend using one
of the SAS procs. Does the following proc summary do what you want?
input var1 var2 var3;
1 . 3
2 3 .
. 4 5
6 . 8
proc summary data=have;
output out=missing (drop=_:) nmiss=;
On Mon, 17 Mar 2008 16:31:23 -0700, Properly <irain168@GMAIL.COM> wrote:
>What I wanted to do is that, I want to create new dataset 'missing'
>which include the number of missing values for each variables.
>However, my original program (I successfully changed it to fit a large
>data set with the help of ART thanks!) shows only 600 variable names
>like: missing_var 1,2,3.....600. How can I change the variable names
>to the corresponding variables in the original dataset like 'ID, name,
>age, gender.....'? What I tried to do is to rename the variable to the
>original name after getting the total missing observations for the
>variable. But it does not work. How to fix this or are there any
>better ways? Thanks so much!
>By the way who can explain what does the "end=eof" and "if eof then
>Thanks $B!* (B
>data missing (keep=missing_var:);
> set originaldataset end=eof;
> array all(*) _all_;
> array missing_var(600);
> retain missing_var;
> do i=1 to dim(all);
> if missing(all(i)) then missing_var(i)+1;
> if eof then output;
>Proc print data=missing;