ANCOVA 后 Tukey 检验的不同结果

问题描述

我为解释 ANCOVA 结果而完成的 Tukey 测试得到了不同的结果,需要帮助理解原因,以及我应该使用哪个。我不确定我是否以某种方式在这里要求 R 提供两种不同的东西,如果两者都可以使用,或者一个是否适合用于寻找组之间差异的事后测试。谢谢!

ANCOVA:

data("mtcars")
mtcars$cyl<-as.factor(mtcars$cyl)
TestANCOVA <- aov(mpg ~hp + cyl,data=mtcars)
summary(TestANCOVA)

方法一:

TukeyHSD(TestANCOVA,which = "cyl")

$cyl
         diff       lwr        upr     p adj
6-4 -4.215572 -7.979527 -0.4516177 0.0257473
8-4 -2.927443 -6.064072  0.2091862 0.0709251
8-6  1.288130 -2.315583  4.8918418 0.6543897

方法二:

out = HSD.test(TestANCOVA,"cyl",group = FALSE)
print(out$comparison)

difference pvalue signif.      LCL       UCL
4 - 6   6.920779 0.0003     *** 3.156825 10.684734
4 - 8  11.563636 0.0000     *** 8.427008 14.700265
6 - 8   4.642857 0.0095      ** 1.039145  8.246569

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...