I am creating a bunch of tables using proc tabulate, but due to the privacy of the individuals who have answered my survey, I need to mask any cell with an N of only 5 or less than 5. I have managed to mask the N, but not the corresponding percentages. Is it possible to do so using proc tabulate? If it is, how do I do this correctly?
I have used the following code:
Proc format;
value hide
1-5= "*"
other = [comma8.];
run;
Proc tabulate data=have;
class year gender quest1;
table (gender="")*(rowpctn N*F=hide.), year*(quest1="");
run;
And this is my current output (I have made up the data):
| | 2014 |
| | Yes | No | Maybe | Total |
Boy | N | 40 | * | * | 50 |
PctN | 80% | 10% | 10% | 100% |
Girl | N | 25 | 25 | 0 | 50 |
PctN | 50% | 50% | 0% | 100% |
I want sas to also mask the cells showing that 10 % of the boys have answered no/maybe. Is this possible?