Tuesday, 17 September 2013

How to run Dunnett C post hoc test in R?

How to run Dunnett C post hoc test in R?

I ran a two-way anova in r with my data set (unequal sample sizes, unequal
variance): 1 variable measured across 3 species (with males and females in
each species). This produces a significant result between species, so I
want to know which pairwise comparisons produce the significance. I know
that there are functions in packages for performing post hoc tests in R:
e.g.
Dunnett's post hoc test from
http://www.uwlax.edu/faculty/toribio/math305_fall09/multiple.txt
library(multcomp)
?glht
test.dunnett=glht(anova_results,linfct=mcp(method="Dunnett"))
confint(test.dunnett)
plot(test.dunnett)
But Dunett's test is designed to compare all groups to a control. Instead
I want to compare all groups to each other, the Dunnett C. Does anyone
know of a package that performs Dunnett C or knows how to code it?
(equation at:
http://pic.dhe.ibm.com/infocenter/spssstat/v21r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.help%2Falg_posthoc_unequalvar.htm)

No comments:

Post a Comment