I have a dataset with 4 variables where var 1 is categorical. I'm trying to do the mean for var2 and var3 based on a proc rank i applied on a 3rd variable(Thus, i the want the mean var2 for 0,1,2,3 as well as the mean for var3 for each of them as well. How can I do that??? I tried doing proc means but it's giving me the mean for each variable in general not for each value of the ranks. my code looks like this: data myd1; input var1 var2 var3 var4; datalines; 1 200 300 55% 2 400 750 20% 3 400 400 90% 4 800 320 98% 5 500 200 80% 6 600 400 71% 7 900 900 22% 8 1000 9580 77% 9 100 3000 42% 10 760 1750 53% ; proc rank data=myd1 groups=4 out=want; var var4; ranks groups; run; --------------------------- Thank you
... View more