Skip to content

R package and Shiny app to determine and justify sample size for two group study designs

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

marton-balazs-kovacs/SampleSizePlanner

Repository files navigation

SampleSizePlanner

Lifecycle: experimental

The goal of SampleSizePlanner is to help researchers determine the sample size for two group designs. The present application and R package offers 9 different sample size planning methods. In addition, the web application allows users to create a justification report for their sample size plan.

Available sample size planning methods

  • Two One‐Sided Tests (TOST)
  • Interval Equivalence Bayes factor
  • Classical power analysis
  • Power curve
  • Bayes Factor Design Analysis (BFDA)
  • Predetermined sample size with Bayes factor
  • Accuracy In Parameter Estimation (AIPE)
  • A-priori precision (APP)
  • Region of Practical Equivalence (ROPE)
  • Non-inferiority Bayes factor

Usage

SampleSizePlanner can be used either via the web app or via R.

Using the web app

You can use the app at https://martonbalazskovacs.shinyapps.io/SampleSizePlanner/.

You can alternatively run the app locally on your own computer by following these instructions:

Install the development version (SampleSizePlanner is not available from CRAN) from GitHub with:

# install.packages("devtools")
devtools::install_github("marton-balazs-kovacs/SampleSizePlanner")

Running the app.

SampleSizePlanner::run_app()

Using the package

You can use the R package to determine the sample size with any of the 9 methods that present in the web app. However, it is not possible currently to generate a justification report from the R package. Please see the tutorial paper or the web app for example sample size justifications for each method.

The tutorial paper for two-group study designs can be found HERE.

Citation

Please cite SampleSizePlanner if you use it for determining your sample size. To cite SampleSizePlanner the software, use:

Kovacs M, van Ravenzwaaij D, Hoekstra R, Aczel B (2021). “SampleSizePlanner: A Tool to Estimate and Justify Sample Size.” https://github.com/marton-balazs-kovacs/SampleSizePlanner.

Or copy the reference information to your BibTeX file:

@Misc{kovacsvanravenzwaaij,
  title = {SampleSizePlanner: A Tool to Estimate and Justify Sample Size},
  author = {Marton Kovacs and Don {van Ravenzwaaij} and Rink Hoekstra and Balazs Aczel},
  year = {2021},
  url = {https://github.com/marton-balazs-kovacs/SampleSizePlanner},
  abstract = {The SampleSizePlanner R package (and shiny application) enables researchers to calculate the sample size for different study desings. The aim of the package is to make the various sample size calculating methods available and propagate the transparent reporting of the chosen method.},
  version = {0.1.0},
}

To cite the tutorial paper on two-group designs use:

Kovacs, M., van Ravenzwaaij, D., Hoekstra, R., & Aczel, B. (2022). SampleSizePlanner: A tool to estimate and justify sample size for two-group studies. Advances in Methods and Practices in Psychological Science, 5(1), 25152459211054059.

Code of Conduct

We are open to new ideas and feature requests.

Please note that the SampleSizePlanner project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.