AngusMcLure / PoolPoweR

Power and sample size calculations for surveys using pool testing (AKA group testing)
GNU General Public License v3.0
0 stars 1 forks source link

`power_size_results()` changes for `power_pool()` printing #37

Closed fredjaya closed 4 weeks ago

fredjaya commented 1 month ago

@AngusMcLure following on from #36 in a PR so it's easier to provide in-line comments before incorporating into the feature branch.

Changes:

Additions:

AngusMcLure commented 4 weeks ago

A couple comments that don't prevent the merge:

fredjaya commented 4 weeks ago

Just pushed for sample_size_pool_random. Let's discuss tomorrow!

AngusMcLure commented 4 weeks ago

Great. Also, just noting a couple related thoughts so I don't forget.

Feeding design back into powerpool is probably slow and inefficient since it recomputes the fisher information.

However, the powerpool functions have a lot of shared code across them, with the one thing being different is how the fisher information are calculated. So I think it might make sense to have a backend power_ function that takes in the fisher information instead of the sample design.

This will reduce code duplication, avoid re-computation of fisher information within samplesize and make it easier to extend to variants of power calculations (e.g. power based on precision of estimates, rather than comparing to a threshold, or power when comparing two samples rather than one sample to a threshold)