Hi @d6k5d3,
Try this:
proc format;
value sign
low-<0 = '<0'
0 = ' 0'
0<-high = '>0';
run;
proc means data=have noprint;
format dv2 dv4 sign.;
class dv4 dv2 dv1 dv3;
types dv4 dv2 dv2*dv1 dv4*dv3;
output out=want;
run;
proc print data=want noobs;
run;
The output contains the requested counts (highlighted below):
dv4 dv2 dv1 dv3 _TYPE_ _FREQ_
. <0 . . 4 1
. 0 . . 4 7
. >0 . . 4 3
. <0 1 . 6 1
. 0 0 . 6 4
. 0 1 . 6 3
. >0 0 . 6 1
. >0 1 . 6 2
<0 . . . 8 2
0 . . . 8 6
>0 . . . 8 3
<0 . . 1 9 2
0 . . 0 9 4
0 . . 1 9 2
>0 . . 1 9 3