I have a dataset which has about 30 dummy variables. I need to show the frequency of all the dummy variables having 1. If I want to achieve this by PROC MEANS, how can I do so? Is there any better way? The idea is to have the following logic:
if dv1=1, dv2=1, dv3=1... dv30=1 then
proc means data= zzz nway noprint;
class dv1 dv2 dv3... dv30;
output out= aaa;
run;
The imaginary dataset is like the following:
data have;
input dv1 dv2 dv3;
datalines;
1 0 1
0 0 1
1 0 0
0 1 1
0 0 1
1 1 0
0 0 0
1 0 0
0 1 0
0 0 1
0 0 0
run;
Much thanks.
Regards.