Welcome to the SampleSizer Shiny app! This app is designed to help researchers and statisticians calculate the necessary sample size for a study.
The SampleSizer app includes the following features:
- Calculation of sample size for mean, proportion, and incidence rate outcomes
- Support for cluster designs
- Support sample size calculation for multiple scenarios
- Customizable color and x-axis variables for data visualization
- A tidi-tidy bit of data validation
- Validators to check input data range
To run the SampleSizer app on your local machine, you have two options:
-
Clone this repository and run either the
server.R
orui.R
file in RStudio. -
Download and launch the app by running the following command in R, after installing the
shiny
package if it is not already installed:
# Install.package("shiny) - # install the package if needed
shiny::runGitHub("SampleSize", "songyosr")
You can also access the app online at https://songyosr.shinyapps.io/Sample_Size/. However, please note that this version may not always be available, as it is hosted on a limited free user account.
To use the app, simply select the outcome type, input method, and other relevant parameters, and then input the data points in the numeric input fields with icons. Click the "Calculate" button to generate the sample size. The app will display the resulting sample size, along with a reactable data frame and a plotly chart for data visualization.
- Adding options to round (ceiling) the estimated sample size/number of cluster
- Changing to a new formula that takes in the unequal size arm
- Adding option for odds ratio for method
- Reworking on the main panel, mainly focus on organizing the output part (still having no idea what to do)
- Creating a test_run dataset
If you have any feedback or suggestions for the SampleSizer app, please feel free to submit a pull request or raise an issue on the GitHub repository.
The SampleSizer app was created by Songyos Rajborirug, who's using this project as an excuse to practice with Shiny. If you find any bugs, it's probably because he's still learning.
This project is licensed under the MIT License - see the LICENSE file for details.