Date: Thu, 27 Dec 2007 14:05:50 GMT
Reply-To: LWn <lars.without_this_part.wahlgren@STAT.LU.SE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: LWn <lars.without_this_part.wahlgren@STAT.LU.SE>
Organization: Telia Internet
Subject: Re: finding the percentage missing for all variables
If you're only interested in the percentage of missing this might you.
Below your variables are v1-v100.
data want (keep=m1-m100 p1-p100);
set have end=the_last_one;
array in[100] v1-v100 ;
array m[100] m1-m100 ;
array p[100] p1-p100 ;
do i=1 to 100 ;
if in[i] = . then m[i]+1 ;
end ;
if the_last_one then do ;
do i=1 to 100 ;
p[i]=m[i]/_n_ ;
end ;
output ;
end ;
run ;
/LWn
"anitha" <uma.anitha@gmail.com> skrev i meddelandet
news:718e6b55-015c-4561-9faa-4d5761b842b6@a35g2000prf.googlegroups.com...
> Hi to All,
> I have one query, hope any one of you can help me in this.
> i have a dataset containing more than 100 variables.
> in that so many observations are missing in all variables.
> now i want to find percentage of missing for each variable.
> please can any one help me in this query.
>
> Thanks in Advance.
> Regards
> Anitha.
|