TukeyHSD 调整后的 P 值为 0.0000000 [英] TukeyHSD adjusted P value is 0.0000000
问题描述
我刚刚执行了阶乘方差分析,然后是 TukeyHSD
后测试.我从 TukeyHSD
输出中调整的一些 P 值是 0.0000000
.这些 P 值真的可以为零吗?或者这是四舍五入的情况,我的真实 P 值可能类似于 1e-17,四舍五入为 0.0000000
.
I just performed a factorial ANOVA, followed by the TukeyHSD
post-test. Some of my adjusted P values from the TukeyHSD
output are 0.0000000
. Can these P values really be zero? Or is this a rounding situation, and my true P value might be something like 1e-17, that is rounded to 0.0000000
.
R 中的 TukeyHSD()
函数是否有任何选项可以提供包含指数的输出 P 值?
Are there any options for the TukeyHSD()
function in R that will give output P-values that contain exponents?
这是我的输出片段:
TukeyHSD(fit)
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = lum ~ cells * treatment)
$`cells:treatment`
diff lwr upr p adj
NULL:a-KR:a -266.5833333 -337.887800 -195.2788663 0.0000000
WT:a-KR:a -196.3333333 -267.637800 -125.0288663 0.0000000
KR:ar-KR:a 83.4166667 12.112200 154.7211337 0.0053485
NULL:ar-KR:a -283.5000000 -354.804467 -212.1955330 0.0000000
WT:ar-KR:a -196.7500000 -268.054467 -125.4455330 0.0000000
KR:e-KR:a -219.0833333 -290.387800 -147.7788663 0.0000000
NULL:e-KR:a -185.0833333 -256.387800 -113.7788663 0.0000000
WT:e-KR:a -96.1666667 -167.471134 -24.8621996 0.0003216
推荐答案
EDIT:请参阅下面关于 Tukey p 值分辨率的警告!!
EDIT: see warning below about resolution of Tukey p-values!!
dd <- data.frame(y=c(1:10,1001:1010),f=rep(c("A","B"),each=10))
fit <- aov(y~f,data=dd)
打印的 p 值为零:
(tt <- TukeyHSD(fit))
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = y ~ f, data = dd)
##
## $f
## diff lwr upr p adj
## B-A 1000 997.1553 1002.845 0
但是查看 str()
的(缩写)输出显示那里有更多信息:
But looking at the (abbreviated) output of str()
shows there's more information there:
str(tt)
## List of 1
## $ f: num [1, 1:4] 1.00e+03 9.97e+02 1.00e+03 2.62e-14
## ..- attr(*, "dimnames")=List of 2
##
您可以自己提取值:
tt$f[,"p adj"]
## [1] 2.620126e-14
或者如评论中所述,print(tt,digits=15)
将起作用......
Or as noted in the comments, print(tt,digits=15)
will work ...
警告
我决定深入挖掘,并在挖掘 TukeyHSD.aov()
的代码时注意到它依赖于 ptukey()
,在它的示例"部分警告精度可能不超过约 8 位数字".特别是,一旦 t 统计量超过 30 左右,p 值就会在 2.62e-14
...
I decided to dig a little deeper and noticed in digging through the code of TukeyHSD.aov()
that it relies on ptukey()
, which in its "Examples" section warns that "the precision may not be more than about 8 digits". In particular, once the t-statistic is above about 30, the p-value maxes out (mins out?) at 2.62e-14
...
zval <- 10^seq(1,6,length=100)
pval <- ptukey(zval,2,18,lower.
par(las=1,bty="l")
plot(zval,pval,log="xy",type="l")
最重要的是,您根本无法区分这么小的 p 值.您可能需要重新考虑您的策略......
The bottom line is that you can't distinguish among p-values this small at all. You may need to rethink your strategy ...
这篇关于TukeyHSD 调整后的 P 值为 0.0000000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!