CTU-Bern / presize

Precision Based Sample Size Calculation
https://ctu-bern.github.io/presize/
GNU General Public License v3.0
15 stars 13 forks source link

Feature request: add method for pragmatic budgetary constraints #70

Closed TomKellyGenetics closed 2 years ago

TomKellyGenetics commented 3 years ago

Function to account for limited budget

As discussed in this preprint (Daniël Lakens, 2021) practical and resource constraints are common in limiting sample size feasibility. This is especially the case in genomics studies where cost of each sample can be prohibitive. This PR adds a function complementary to those in the package to account for this, see the example below.

> prec_budget(budget = 5000, price = 250, conf.width = 0.5, fail = 0.15, sd = 1)

     sample size for budget 

  budget price mu sd  n conf.width conf.level
1   5000   250 NA NA 17         NA         NA

This uses the following formula:

Screen Shot 2021-04-05 at 10 59 02

This is a suggestion and is not part of my JOSS review. Inclusion is at the maintainer's discretion.

aghaynes commented 3 years ago

Thanks for thinking about this @TomKellyGenetics. I suggest that we complete the JOSS review and then we can think about this more... is that OK?

TomKellyGenetics commented 3 years ago

Of course, the JOSS review should be prioritised. Thanks for considering this.

aghaynes commented 2 years ago

Hi @TomKellyGenetics. We've though about this long and hard and decided that this isn't really something that we feel should be included in the package. It's not a precision question... Hope thats OK. Thanks for the thought though!