@d6k5d3 wrote:
I have the following dataset:
Using PROC FREQ or any better PROC I want to know the following frequencies:
dv2>0
dv2<0
dv4>0
dv4<0
dv2= 0 when dv1= 1
dv4= 0 when dv3= 1
How can I get them?
Much thanks again.
Regards.
What do you want done about the dv2 and dv4 = 0? Do need the percents or just the counts of <0 and > 0?
One common approach to examining groups of a variable's values is to use a custom format. Such as
proc format library=work;
value notzero
low -<0 ='<0'
0< -high='>0'
;
proc freq data=have;
tables dv2 dv4 ;
format dv2 dv4 notzero.;
run;
However a format would be applied to all use of the variables in single proc freq so to get the other bits you would need a separate call to proc freq.
And if you need a data set there are other considerations involved.