r - TukeyHSD adjusted P value is 0.0000000 -
i performed factorial anova, followed tukeyhsd
post-test. of adjusted p values tukeyhsd
output 0.0000000
. can these p values zero? or rounding situation, , true p value might 1e-17, rounded 0.0000000
.
are there options tukeyhsd()
function in r give output p-values contain exponents?
here snippet of output:
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: see warning below 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)
the printed p-value zero:
(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
but looking @ (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 ##
you can extract value yourself:
tt$f[,"p adj"] ## [1] 2.620126e-14
or noted in comments, print(tt,digits=15)
work ...
warning
i decided dig little deeper , noticed in digging through code of tukeyhsd.aov()
relies on ptukey()
, in "examples" section warns "the precision may not more 8 digits". in particular, once t-statistic above 30, p-value maxes out (mins out?) @ 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")
the bottom line can't distinguish among p-values small @ all. may need rethink strategy ...
Comments
Post a Comment