Hello, I would like to calculate the percentage of men and women with a salary below each decile (<p10, <p20...). So I have a binary variable gender, a variable for salaries (from 1 to 20'000). I tried to separate my database into 10 equal parts with proc rank. proc rank data=database groups=10 descending out=ranked;
var wages;
ranks decile;
run; Then I sorted it by gender and did a proc freq for the first decile (the idea is to repeat this for each decile). proc sort data=ranked
out=ranked_sort;
by sex;
run;
proc freq data= ranked_sort ;
where decile = 9 ; * p10 ;
table wages*sex ;
run; I find a total of % for men and for women but I also have the details for each wage (1-3000) in the decile. I would like to have only the total for the decile. Does anyone have an idea how to do this? Thanks in advance, regards, Jo
... View more