Hi everyone. I need to perform suppression for a dataset with thousands of rows so trying to avoid doing this manually in excel. My dataset is already aggregated, a picture is below. Within each group of campus, academicyear, award, and ethnicity, I need to suppress the number in field "countstring." ("Countstring" is a copy of the field 'count' but is in character format to allow replacing with asterisks in SAS). Ideally I'd be replacing the value in "countstring" according to the following rules: 1. Any cell size smaller than 6 is automatically suppressed. 2. When the first cell in a group is suppressed, the next-largest value is also suppressed. For example in the group "9. Unknown" starting in row 287 of my image, row 288 with a count of 7 will need to be suppressed, to avoid backing into the count in row 287. (Although totals are not in this dataset, they are published elsewhere). 3. If a cell is larger than 5, but all of the cells above it in the group sum to less than 6, then it needs to be suppressed (for example, row 270 would need to be suppressed because the two rows above it sum to only 4). 4. However, if multiple cells smaller than 6 are suppressed and they sum to more than 5, then the next cell does not need to be suppressed (for example, even though the cell above row 267 is less than 6, complementary suppression does not need to be applied to the value of '7' in row 267, because the sum of the suppressed values in that group is more than 5. 5. zeroes should not be suppressed. I am unsure how to write this in SAS. I've done some web searching, but none of the examples seem to be the same as my case. Anyone have experience with this type of suppression, or just how to refer to the rows above, to write some rules, within a group? Many thanks.
... View more