Prospective power analysis and design planning using
the "plug-in" approach described by Piepho et al. (2022)
This package provides some tools for power analysis when using what Piepho et. al (2022) called the "plug-in approach" to power analysis, as described in the chapter Precision, Power, Sample Size and Planning in Generalized Linear Mixed Models: Modern Concepts, Methods and Applications.
The basic idea is to encode information about sample size and expected treatment means (and differences) for the proposed experiment in a fake data set, to then specify a model encoding information about the design of the proposed experiment, and finally to "fit" the model while specifying (rather than estimating) the values for the random effects and dispersion parameters (based on pilot studies, previously published research or estimated guesswork). The result is that the mixed modelling software does all the requisite work of calculating standard errors upon which confidence intervals and statistical power can be derived. By manipulating the fake data set, model, or variance parameter values, it becomes possible to explore how differences in sample size, effect size, experimental design, or random effects will impact power.
A very important feature of the package are its vignettes (still under development), which serve to:
Provide a fuller, more detailed description of this approach to power analysis, as well as some useful background information on the use of estimated marginal means and contrasts in R
Present a variety of practical examples demonstrating the various ways this approach can serve the concrete needs of practicing researchers (especially those in the agricultural sciences)
Provide a vehicle for introducing and discussing a number of complexities related to the use of mixed models, and generalized linear mixed models in particular, which I think are not as fully or widely appreciated as they should be.
Please note that this effort remains very much a work in progress. Any issues, concerns, questions, bugs, feature requests, etc., can be posted on the Issues page (https://github.com/SimonShamusRiley/powerutilities/issues).
You can install the development version of powerutilities from Github with:
install.packages("devtools")
devtools::install_github('SimonShamusRiley/powerutilities',
build_vignettes = T)