## 20.22 正态性检验 shapiro.test

Usually (but not always) doing tests of normality reflect a lack of understanding of the power of rank tests, and an assumption of high power for the tests (qq plots don’t always help with that because of their subjectivity). When possible it’s good to choose a robust method. Also, doing pre-testing for normality can affect the type I error of the overall analysis.

— Frank Harrell 34

Shapiro 和 Wilk’s 提出的 W 检验

Performs the Shapiro-Wilk test of normality.

usage(shapiro.test)
shapiro.test(x)