Date: Tue, 25 Oct 2005 01:47:59 +0000
Reply-To: SAS_L@LISTSERV.EDU.AU
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Laughing Beggar <laughing_beggar@HOTMAIL.COM>
Subject: Counting entries across variables
Content-Type: text/plain; format=flowed
Hi all,
I have 20 character variables (d1-d20), that fill up from the left (ie there
wont be an entry in d2 if there isnt one in d1 etc). I need to count how
many records have an entry (of any non-missing sort) in d1 only, then how
many records have an entry in d1 and d2 only, then in d1-d3 only, then in
d1-d4 only etc. So for each record I need to know how many of the d1-d20 are
filled (call it x)and then I need a frequency distibution of x ("200 records
have one (and only one) of d1-d20 filled, 150 have 2 (and only 2) filled, 56
have 3 (and only 3) filled etc). All tips on how I might do this will be
greatly appreciated.
Cheers
L_B
"The beggar laughs in the face of the thief"
|