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.
翻译:本文阐述了如何通过计算机模拟计算统计检验的功效。提供了多种经典推断方法的功效模拟R代码,包括单样本与双样本t检验、卡方检验、回归分析及方差分析。