DATA test;
INPUT name$ group_no$;
CARDS;
John 1
Michelle 1
Peter 1
Kai 2
Peter 2
Liam 2
Claire 2
Sam 3
Jim 3
run;
How do I find the percentage of people within each group. i.e 33.3% in group 1. 44.4% in group 2 etc....
I tried using the code below but it was not sufficient in answering my question. I believe I may have to use SQL code;
Proc FREQ data = test;
TABLE group_no;
BY group_no;
RUN;
Please let me know how to solve the issue.
proc means as shown by data null is the way to go. In SQL you can do as shown below.