PoolInfRate has this functionality https://github.com/CDCgov/PooledInfRate, and PoolTestR has it indirectly if you use regression models. We could implement it either similarly to PoolnfRate, or by just providing an interface to the regression way of doing it. The latter would let us calculate two sample differences adjusted for clustering so would be my preferred option.