I have data in SAS like this:
Role Answer
A -
A Diabetes
B -
B Diabetes
B Diabetes
B -
C -
C -
As you can see, out of role A, only one answered the question, so the response rate would be 50%. Similarly, in role B two people answered the question. The response rate would be 33.33%. For C, it would be 0%.
How can I combine similar rows so that my data would look like this:
Role Response Rate
A 1(50%)
B 2 (33%)
C 0 (0%)
OR
A B C
Reponse Rate 1(50%) 2(33%) 0(0%)
I have tried everything I know about SAS.