When designing a case-control study to investigate differences in microbial composition, it is fundamental to assess the sample sizes needed to detect an hypothesised difference with sufficient statistical power. Our application includes power calculation for (i) a recoded version of the two-sample generalised Wald test of the “HMP” R-package for comparing community composition, and (ii) the Wilcoxon-Mann-Whitney test for comparing OTU-specific abundances between two samples (optional). The simulation-based power calculations make use of the Dirichlet-Multinomial model to describe and generate abundances. The web interface allows for easy specification of sample and effect sizes.
As an illustration of our application, we compared the statistical power of the two tests, with and without stratification of samples. We observed that statistical power increases considerably when stratification is employed, meaning that less samples are needed to detect the same effect size with the same power.
Availability and Implementation: The web interface is written in R code using Shiny© (RStudio inc., 2015) and it is available at https://fedematt.shinyapps.io/shinyMB.
The R code for the recoded generalised Wald test can be found at https://github.com/mafed/msWaldHMP.