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

Period sampling #25

Closed AngusMcLure closed 10 months ago

AngusMcLure commented 10 months ago

Implements fi_pool_cluster_random and optimise_random_prevalence for evaluating and designing surveys where the number of units caught at each site (or overall) are random. Introduces a few pieces of machinery (catch distributions and pooling strategies) to make this work. Also quickly ran into problems with convergence of integrals with fi_pool_cluster (which is called repeatedly by the new functions, often in 'edge' cases). I have addressed the worst of these so that this will work, but there are some more improvements I have identified (which I've listed in a separate issue: #24)

AngusMcLure commented 10 months ago

Hi Fred, Yes, I was able to reproduce the problem. The issue was fixed in c03a54e. Running the tests you have created identified other problems, most of which have been fixed in e29d110, db687bf, 013326c. There are still a few tests failing to converge, but these tests have quite extreme values of inputs, so I'm surprised they were ever converging before, and the test values they are testing against seem wrong anyway, so I think the tests need to be revisited.

AngusMcLure commented 10 months ago

Merging even though the tests are failing as I think it's the tests that need to be fixed in this case

fredjaya commented 10 months ago

Great! Is it safe to assume that all the tests that fail are the incorrect ones that need amending?

AngusMcLure commented 10 months ago

Yes, but I think we should change (or add) a few others. Might be easier to go through them together in a call? I can arrange tomorrow, when I have some time for this