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

Perform likelihood calculations on log scale to improve accuracy in edge cases #24

Open AngusMcLure opened 7 months ago

AngusMcLure commented 7 months ago

The fi_pool_cluster() currently does a lot of integration over integrands involving lots of subtraction, powers, and multiplications, which begin to suffer when prevalence (the variable of integration) is close to the 0 or 1. Changing these calculations to be robust at these edge cases might avoid some of the convergence issues we are getting with extreme values of beta. I have already done this for logitnorm and this looks promising, but should apply this more broadly. A list of functions consider this for: