Shiny apps


Ben Prytherch
Colorado State University Department of Statistics

Hello, I'm Ben Prytherch, a faculty instructor in the Department of Statistics at Colorado State University.  This page hosts some of the apps I have developed, mostly for use in courses serving undergraduate students who are majoring or minoring in statistics or data science.  The apps were all made using the Shiny package from RStudio.  The images below link to pages with more detail on each app.  The images on those pages link to the apps themselves.  

The purpose of these apps is to demonstrate how statistical methods and models work, using data simulation and visualization.   Most of them simulate data according to the rules of a model, plot the simulated data, and report statistical results obtained by fitting the simulated data to the model from which they were generated.   The user can adjust values of model parameters or change features of the model, then see what happens to the plotted data and to the statistical results.   Most apps have an option to change the random seed, which will generate a new (pseudo-) random set of data.

I believe that playing around with models and seeing what happens can illuminate what the models are doing, what the statistical results describe, and what the models implicitly claim about how data are generated.   Students and practitioners of statistical methods are accustomed to asking "what kind of model should I use to analyze my data?" and "how do I interpret the results of my analysis?"  If you understand the manner in which a model generates simulated data, you will be better able to decide when it should be applied to real data - and better able to make sense of the subsequent statistical results.

The plots in these apps are based on some of the pictures I find myself drawing when students ask questions that I can't answer well with words.  Any time I hear "oh, that makes way more sense now" in response to a drawing, I make a mental note that the drawing ought to be an app.

I welcome feedback, questions, and suggestions for improvements; you can contact me at ben.prytherch@colostate.edu  

Factorial ANOVA: manipulate and compare  main and interaction effects

Mixed effects ANOVA: adjust random effect variances and fixed effect slope

Mixed effects ANOVA: random slopes with a continuous X

Multiple testing: compare Type I and Type II errors under Bonferroni, Tukey, and unadjusted Student's t


ANCOVA: adjust means and covariate slopes, with or without interaction

ANOVA: adjust means, variance, sample size, and parameterization

ANCOVA: adjust means and covariate slopes, with or without interaction

ANOVA: adjust means, variance, sample size, and parameterization

Logistic regression: compare estimated probability, odds, log odds, OR, and RR

Visual demonstration of "repeated sampling"

Odds ratio vs. relative risk: manipulate baseline risk to see how these connect, graphically and algebraically

How correlation relates to slope in simple linear regression

The normal QQ plot: compare data generated from normal, skewed, and heavy-tailed distributions


Applying principal component analysis (PCA) to Supreme Court voting data