Good afternoon all! Here is the sample dataset (real data has 9 variable conditions)
data have;
input Neuroses $ Psychoses $ SignsSimpt $ Antisocial $ Depression $ Anomalies_Neurological $ ;
datalines;
40891863A 51330023A 84501233A 77699061A 32596703A 21189153A 77425921A 80328413A 61073933A 81441794A 10418753A 14050203A 13885263A 57306061A 08707021A 58633031A 44606543A 22757783A 01247023A 42638553A 32907423A 47662551A 52508373A 30956893A 44606543A 58393081A 64904003A 28133791A 20982933A 75235783A
;
run;
So basically under each diagnosis condition, there are patient id's. A patient could have more than one condition. What i want is an output which tells that how many patients have 9 conditions at once, 8 conditions at once, 7 conditions at once and so on. So, essentially something like this
No of conditions 1 2 3 4 5 6 7 8 9
No of members 450 378 245 200 145 100 56 34 12
I tried playing around with simple proc transpose, but im not going anywhere. Thanks so much!
... View more