R语言中,如果样本大小超过5000,shapiro.test()
函数将无法运行。
shapiro.test(rnorm(10^4))
为什么会这样?我能超越这个限制吗?
R语言中,如果样本大小超过5000,shapiro.test()
函数将无法运行。
shapiro.test(rnorm(10^4))
为什么会这样?我能超越这个限制吗?
这是一项安全限制。请阅读此内容:执行Shapiro-Wilk正态性检验
其他正态性检验并没有这个限制,例如Kolmogorov-Smirnov检验:
ks.test(x=rnorm(10^4),y='pnorm',alternative='two.sided')
shapiro.test()
来检验9500个值,我不知道他们是如何做到的。 - Daniel_j_iii