R 中 Welch 校正的单向方差分析的事后检验

jju*_*lip 3 r anova posthoc

我已经oneway.test()在 R 中使用韦尔奇的校正运行了单向方差分析测试,因为我的数据违反了等方差的假设(转换没有解决问题)。

一个简单的数据示例:

> dput(df)
structure(list(Count = c(13, 14, 14, 12, 11, 13, 14, 15, 13, 
12, 20, 15, 9, 5, 13, 14, 7, 17, 18, 14, 12, 12, 13, 14, 11, 
10, 15, 14, 14, 13), Group = structure(c(1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("a", "b", "c"
), class = "factor")), .Names = c("Count", "Group"), row.names = c(NA, 
-30L), class = "data.frame")

library(car) 
grp = as.factor(c(rep(1, 10), rep(2, 10),rep(3, 10)))
leveneTest(df$Count,grp) #unequal variances

#one-way ANOVA with welch's correction
oneway.test(Count ~ Group, data=df, na.action=na.omit, var.equal=FALSE)
Run Code Online (Sandbox Code Playgroud)

我有多个组,所以我现在想运行成对的事后测试。有没有办法用 oneway.test() 函数中的对象来做到这一点?如果不是,如何对方差不等的组进行成对测试?我无法在网上找到这个问题的答案。任何意见,将不胜感激。

Ana*_*ira 5

补充一点,尽管时机不好,而且我一直在寻找类似的东西,但也可以选择执行 Games-Howell 测试。这甚至被所述“posthoc.tgh”的作用下结合在“userfriendlyscience” R封装在此引入stackexchange_post。它代表了 Tukey?Kramer 不等方差检验的扩展。posthocTGH {用户友好的科学}

原始出版物(甚至在我出生之前):Paul A. Games 和 John F. Howell。 具有不等 N 和/或方差的成对多重比较程序:蒙特卡罗研究。教育与行为统计杂志,第 1 卷,第 2 期,1976 年,第 113-125 页。doi:10.3102/10769986001002113