[R-sig-ME] GLM: Difference between treatment groups for each colony (Tukey posthoc test)

Sophie Waegebaert sophie.waegebaert at gmail.com
Mon Dec 7 12:02:36 CET 2015


Hi,

I'm still learning how to use R and I have some trouble making using Tukey
posthoc tests. I have a dataset with 3 colonies (A, B and C). Each colony
is divided into 2 treatments: control and DWV. I want to run a GLM to test
wether there is a difference in life expectancy (last.scan) between the
treatment groups for each of the colonies, but I do not know if I am using
the right strategy.

I have taken 'treatment' as a fixed factor and 'colony' as a random factor:

fit_life = lmer(last.scan~treatment + (1|colony), data =
data)Anova(fit_life, type = 3) # Type of treatment has a significant
effect on on the life expectancy.
    Response: last.scan
          Chisq Df Pr(>Chisq)
    (Intercept) 106.976  1  < 2.2e-16 ***
    treatment    25.373  1  4.724e-07 ***

And this is the code I use to do a Tukey posthoc test:

mcp = glht(fit_life, linfct = mcp(treatment = "Tukey"))
summary(mcp)# DWV treatment significantly changes life expectancy (z =
-9.734, p = < 2e-16)

Is it possible to find the difference for each colony?

Thanks a lot for an explanation or hint!

Cheers,

Sophie

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list