| Title: | Interactive 'Shiny' Apps for Building Statistical Intuition |
| Version: | 0.2.0 |
| Date: | 2026-09-27 |
| Description: | Provides interactive 'Shiny' applications for building intuition in statistics and data science. The apps run locally and use visualization, simulation, and repeated sampling to illustrate topics such as probability distributions, permutation tests, analysis of variance, linear regression, and sums of squares. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| RoxygenNote: | 8.0.0 |
| Imports: | dplyr (≥ 1.1.0), ggplot2 (≥ 3.4.0), purrr (≥ 1.0.0), shiny (≥ 1.7.0), tibble (≥ 3.0.0) |
| Depends: | R (≥ 4.1.0) |
| URL: | https://github.com/vbaliga/statsapps, https://vbaliga.github.io/statsapps/ |
| BugReports: | https://github.com/vbaliga/statsapps/issues |
| Suggests: | testthat (≥ 3.2.0) |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-09-28 01:39:09 UTC; vikrambaliga |
| Author: | Vikram B. Baliga |
| Maintainer: | Vikram B. Baliga <vikram.baliga@ubc.ca> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-28 02:40:02 UTC |
Launch the one-way ANOVA simulator
Description
Opens an interactive Shiny app for exploring how group means, within-group variation, and sample size affect a one-way ANOVA.
Usage
run_anova_app(...)
Arguments
... |
Optional arguments passed to |
Details
All data are simulated in R via rnorm().
Value
run_anova_app() opens the Shiny app locally.
Examples
run_anova_app()
Launch the probability distributions app
Description
Opens an interactive Shiny app for exploring common probability distributions used in BIOL 300.
Usage
run_distributions_app(...)
Arguments
... |
Optional arguments passed to |
Details
All data were simulated and don't come from a specific study.
Value
run_distributions_app() opens the Shiny app locally.
Examples
run_distributions_app()
Launch the simple linear regression app
Description
Opens an interactive Shiny app for exploring how the slope and intercept of a linear model affect fitted values and residuals.
Usage
run_linear_reg_app(...)
Arguments
... |
Optional arguments passed to |
Details
All data were simulated and don't come from a specific study.
Value
run_linear_reg_app() opens the Shiny app locally.
Examples
run_linear_reg_app()
Launch the permutation test app
Description
run_permutation_app() opens an interactive Shiny app that demonstrates how
repeated random reassignment of observations can be used to build a null
distribution for a two-sample permutation test.
Usage
run_permutation_app(...)
Arguments
... |
Optional arguments passed to |
Details
The app uses data on time to mating in female sagebrush crickets from Johnson et al. (1999), as presented in The Analysis of Biological Data by Whitlock and Schluter.
Value
run_permutation_app() opens the Shiny app locally.
References
Johnson, J. C., T. M. Ivy, and S. K. Sakaluk. 1999. Female remating propensity contingent on sexual cannibalism in sagebrush crickets, Cyphoderris strepitans: a mechanism of cryptic female choice. Behavioral Ecology 10: 227-233.
Whitlock, M. C., and D. Schluter. 2020. The Analysis of Biological Data. 3rd ed. W. H. Freeman and Company.
Examples
run_permutation_app()
Launch the power and precision app
Description
Opens an interactive Shiny app for exploring how sample size, explanatory variables, interactions, and repeated measurements affect statistical power and confidence intervals for a known, fictional caffeine effect.
Usage
run_power_precision_app(...)
Arguments
... |
Optional arguments passed to |
Details
All data are simulated. Sample size ranges from 12 to 180 people in steps of 6, with 42 people by default. Equal numbers are assigned to each combination of drink and age group. The true caffeine-minus-decaf effect is fixed at -25 milliseconds.
Optional repeated measurements provide 1 to 5 observations per person. When person identity is accounted for, a random-intercept model is fitted by restricted maximum likelihood (REML). Predictors are constant within each person. Mixed-model confidence intervals and power are approximate. This is not a general-purpose mixed-model fitter.
Power is calculated from the known simulation parameters, not from estimates fitted to the displayed outcomes. Confidence intervals describe the caffeine-minus-decaf effect estimated from the displayed sample. When the drink-by-sleep interaction is included, this contrast is evaluated at 7 hours of sleep.
Value
run_power_precision_app() opens the Shiny app locally.
Examples
run_power_precision_app()
Launch the sums of squares app
Description
Opens an interactive Shiny app for exploring how total variation can be partitioned into group-level and within-group components in one-way ANOVA.
Usage
run_sums_squares_app(...)
Arguments
... |
Optional arguments passed to |
Value
run_sums_squares_app() opens the Shiny app locally.
Examples
run_sums_squares_app()