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

检验:拒绝原假设和接受原假设的风险,数据本身和理论的正态分布的距离,抛开 P 值

Shapiro 和 Wilk’s 提出的 W 检验

Performs the Shapiro-Wilk test of normality.

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