I did a nested ANOVA for my Data. For that, I tried to orientate on the example on this page:
https://rcompanion.org/rcompanion/d_07.html
My Data looks like this:
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
I was able to perform the nested ANOVA as described on the page, but struggle to get the Post hoc test done:
library(multcomp)
posthoc = glht(model,
               linfct = mcp(Treatment="Tukey"))
mcs = summary(posthoc,
              test=adjusted("single-step"))
mcs
This is the output I get:
> 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
