Hi. I have this data set with duplicates. I want to add a Group column where if an ID with duplicates received all the same scores, then they are labelled as 1, otherwise, labelled as 2. If an ID has no duplicate, then it is labelled as 3. data have ; input ID $ score ; cards ; 1 10 1 10 2 5 3 20 3 21 3 20 4 15 4 18 5 . 6 8 6 8 7 17 7 17 7 25 ; run ; The result would look like this. ID Score Group 1 10 1 1 10 1 2 5 3 3 20 2 3 21 2 3 20 2 4 15 2 4 18 2 5 . 3 6 8 1 6 8 1 7 17 2 7 17 2 7 25 2 Then I want to create a table summarizing the results counting the IDs (only once if duplicates) that had the same scores (Group 1), different scores (Group 2) and those without duplicates (Group 3). The table would look something like this. Group Frequency 1 2 2 3 3 2 Thank you for your help!
... View more