0

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.

4
  • 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, 2011 at 1:18
  • @ Journeyman: thanks! which tag should I use for SAS questions?
    – Nupur
    Sep 21, 2011 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, 2011 at 1:29
  • 1
    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, 2014 at 17:55

0

You must log in to answer this question.

Browse other questions tagged .