Date: Mon, 17 Mar 2008 18:58:45 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: how to correct this program. Thanks!
Content-Type: text/plain; charset=ISO-8859-1
Did you say you have both Character and numeric that you want to count
missing? Make and example data set that represents your problem data,
and post it.
On Mon, Mar 17, 2008 at 6:31 PM, Properly <firstname.lastname@example.org> 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
> output" mean?
> 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;
> rename missing_var(i)=all(i);
> if eof then output;
> Proc print data=missing;