R:事后测试嵌套方差分析

时间:2020-02-13 16:24:26

标签: r nested anova posthoc

我为我的数据做了一个嵌套方差分析。为此,我尝试定位此页面上的示例:

https://rcompanion.org/rcompanion/d_07.html

我的数据如下:

Treatment    Group    Donation
1              1         0
1              1         1.2
1              2         0.3
1              2         0.7
2              1         0.1
2              1         1
2              2         0
2              2         0.7

我能够按照页面上的描述执行嵌套的ANOVA,但是很难完成Post hoc测试:

library(multcomp)
posthoc = glht(model,
               linfct = mcp(Treatment="Tukey"))
mcs = summary(posthoc,
              test=adjusted("single-step"))
mcs

这是我得到的输出:

> library(multcomp)
> posthoc = glht(model,
+                linfct = mcp(Treatment="Tukey"))
Error in `[.data.frame`(mf, nhypo[checknm]) : undefined columns selected
> mcs = summary(posthoc,
+               test=adjusted("single-step"))
Error in summary(posthoc, test = adjusted("single-step")) : 
  object 'posthoc' not found
> mcs
Error: object 'mcs' not found

0 个答案:

没有答案