thomas-rasmussen / sas_macros

SAS macros
Creative Commons Zero v1.0 Universal
5 stars 4 forks source link

mask_table: primary suppression of large numbers is not enough? #54

Open thomas-rasmussen opened 2 years ago

thomas-rasmussen commented 2 years ago

Found, by accident, an example where the macro does not seem to correctly mask the table if mask_big = y (as per default). The problem seems to be that the macro only does primary suppresion of large numbers, but this is not enough? As can be seen from the example, value 1 for cat_var has been left unmasked (33) for treat = 0, ie primary suppression has only been done on value 1 for cat_var for treat = 1 (5), because 9(n) - 4(mask_max) <= 5(value). But we know that there are 38 patients in the overall treatment strata, so we also need to mask cat_var for treat = 0, we do need secondary suppresion? Look into this.

repex.txt

thomas-rasmussen commented 2 years ago

We do need secondary suppression for large numbers as well. Maybe it can be implemented by running a modified secondary suppression algorithm on the table where all numbers are subtracted from "__n"? Might not be that hard to implement, but it will make the macro quite a bit longer/more complicated.

For now, suppression of large number functionality will be disabled since it is not working as intended.