Table of Contents
Fetching ...

Simulating the Power of Statistical Tests: A Collection of R Examples

Florian Wickelmaier

TL;DR

This paper illustrates how to calculate the power of a statistical test by computer simulation by providing 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.

Abstract

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.

Simulating the Power of Statistical Tests: A Collection of R Examples

TL;DR

This paper illustrates how to calculate the power of a statistical test by computer simulation by providing 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.

Abstract

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.

Paper Structure

This paper contains 46 sections, 1 figure.

Figures (1)

  • Figure 1: Power of the binomial test in the birth-rates example (H$_0$: $\pi = 0.5$) as a function of effect size and sample size. The dashed line marks the target effect of $d = 0.015$ where power hits about $0.8$ for $n = 9000$.