Simulating the Power of Statistical Tests: A Collection of R Examples
This paper illustrates how to calculate the power of a statistical test by computer simulation. It provides R code for power simulations of several classical inference procedures including one- and two-sample t tests, chi-squared tests, regression, and analysis of variance.
READ FULL TEXT