与简单设计相比,分割图设计是否需要针对Tukey HSD进行不同类型的编码?

时间:2019-10-21 15:15:12

标签: r tukey

我使用了搜索功能,很惊讶没有找到任何内容。我熟悉用R为Tukey的HSD为其他实验设计编写代码,但是如果用于分割图设计,是否需要更改任何内容?当我键入用于简单实验设计的代码时,得到的响应不是我想要的。

作为参考,这是我的数据的头。如果需要,我可以分享更多内容:

 dput(head(rawData))
structure(list(ï..Plot = 2111:2116, Variety = structure(c(5L, 
4L, 3L, 6L, 1L, 2L), .Label = c("Burbank", "Hodag", "Lamoka", 
"Norkotah", "Silverton", "Snowden"), class = "factor"), Rate = c(4L, 
4L, 4L, 4L, 4L, 4L), Rep = c(1L, 1L, 1L, 1L, 1L, 1L), totalTubers = c(594L, 
605L, 656L, 729L, 694L, 548L), totalOzNoCulls = c(2544.18, 2382.07, 
2140.69, 2401.56, 2440.56, 2503.5), totalCWTacNoCulls = c(461.76867, 
432.345705, 388.535235, 435.88314, 442.96164, 454.38525), avgLWratio = c(1.260615419, 
1.287949374, 1.111981583, 1.08647584, 1.350686661, 1.107173509
), Hollow = c(14L, 15L, 22L, 25L, 14L, 13L), Double = c(10L, 
13L, 15L, 22L, 11L, 9L), Knob = c(86L, 80L, 139L, 156L, 77L, 
126L), Researcher = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = "Wang", class = "factor"), 
    CullsPounds = c(1.75, 1.15, 4.7, 1.85, 0.8, 5.55), CullsOz = c(28, 
    18.4, 75.2, 29.6, 12.8, 88.8), totalOz = c(2572.18, 2400.47, 
    2215.89, 2431.16, 2453.36, 2592.3), totalCWTacCulls = c(466.85067, 
    435.685305, 402.184035, 441.25554, 445.28484, 470.50245)), row.names = c(NA, 
6L), class = "data.frame")

我对查看不同费率的不同字母类别感兴趣。我想把它们放在一个图表上,该图表具有每个Variant(总共六个)的条形图,y轴上的totalCWTacCulls,x轴每个上的5 Rates

这是我要用于此数据的方差分析:

require(agricole)
model <- with(rawData, sp.plot(Rep, Rate, Variety, totalCWTacCulls))

这是我写出Tukey的HSD测试的方法:

TukeyAOV <- aov(totalCWTacCulls ~ Rep + Rate, data=rawData)
summary(TukeyAOV)
HSD <- HSD.test(TukeyAOV, "Rate", alpha = 0.05, group=TRUE)
print(HSD$groups)

但是,这给了我我所不期望的信息:

  totalCWTacCulls groups
1        469.5366      a
2        469.4445      a
5        461.2242      a
3        456.3787      a
4        451.1329      a

对于我做错了什么以及我可以做不同的事情的任何帮助,将非常感谢。预先感谢!

0 个答案:

没有答案