Interactively Demonstrate Statistical Power
ShinyPowerExamp.RdLaunches a Shiny app wrapping power.examp: it plots the
sampling distributions of a test statistic under the null and
alternative hypotheses, along with the rejection region, alpha, and
power.
Details
This function requires the shiny package to be installed. Changing the sample size, standard deviation, true difference, or alpha updates the plot so you can see the effect of each parameter on statistical power.
Value
Launches the app in non-blocking mode (via
startApp) and returns a ShinyAppHandle
immediately, so the R console remains available while the app runs
in the background. Use handle$stop() to stop the app.
Author
Greg Snow 538280@gmail.com
Examples
if(interactive()) {
h <- ShinyPowerExamp()
# h$stop() # run this when finished with the app
}