Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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%)


                    A          B                 C
Reponse Rate     1(50%)      2(33%)            0(0%)

I have tried everything I know about SAS.

share|improve this question
SAS the statistical suite, as opposed to the hard drive format, i presume - in which case, we may need to look up a way to seperate the tags... –  Journeyman Geek Sep 21 '11 at 1:18
@ Journeyman: thanks! which tag should I use for SAS questions? –  Nupur Sep 21 '11 at 1:28
I'm not actually sure - i've asked on meta since this is not a situation that I've seen so far. I'd leave it as is for now. –  Journeyman Geek Sep 21 '11 at 1:29
I'd recommend asking SAS programming language questions on www.stackoverflow.com rather than this site. Also, why is the response rate 33% for B? You have 2 answers out of 4 rows, so I'd have thought it would be 50%. –  user3490 Nov 23 '14 at 17:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.