我正在使用 R 'multcomp' 库 ( http://cran.r-project.org/web/packages/multcomp/ ) 来计算 Dunnett 的测试。我正在使用下面的脚本:
Group <- factor(c("A","A","B","B","B","C","C","C","D","D","D","E","E","F","F","F"))
Value <- c(5,5.09901951359278,4.69041575982343,4.58257569495584,4.79583152331272,5,5.09901951359278,4.24264068711928,5.09901951359278,5.19615242270663,4.58257569495584,6.16441400296898,6.85565460040104,7.68114574786861,7.07106781186548,6.48074069840786)
data <- data.frame(Group, Value)
aov <- aov(Value ~ Group, data)
summary(glht(aov, linfct=mcp(Group="Dunnett")))
现在,如果我通过 R 控制台多次运行此脚本,我每次都会得到非常不同的结果。这是一个例子:
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Dunnett Contrasts
Fit: aov(formula = Value ~ Group, data = data)
Linear Hypotheses:
Estimate Std. Error t value Pr(>|t|)
B - A == 0 -0.35990 0.37009 -0.972 0.76545
C - A == 0 -0.26896 0.37009 -0.727 0.90019
D - A == 0 -0.09026 0.37009 -0.244 0.99894
E - A == 0 1.46052 0.40541 3.603 0.01710 *
F - A == 0 2.02814 0.37009 5.480 0.00104 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported -- single-step method)
这是另一个:
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Dunnett Contrasts
Fit: aov(formula = Value ~ Group, data = data)
Linear Hypotheses:
Estimate Std. Error t value Pr(>|t|)
B - A == 0 -0.35990 0.37009 -0.972 0.7654
C - A == 0 -0.26896 0.37009 -0.727 0.9001
D - A == 0 -0.09026 0.37009 -0.244 0.9989
E - A == 0 1.46052 0.40541 3.603 0.0173 *
F - A == 0 2.02814 0.37009 5.480 <0.001 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported -- single-step method)
如您所见,上述两个结果差异很小,但足以将最后一组(F)从两颗星移到三颗星,这让我感到担忧。
我对此有几个问题:
- 为什么会这样?!当然,如果您每次输入相同的数据,您应该得到相同的数据。
- 在 Dunnett 的计算中是否使用了某种随机数?
- 每次这种细微的变化真的是个问题吗?