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

Peter Claussen dakotajudo at mac.com
Mon Dec 7 15:43:14 CET 2015


Sophie,

As I read this, you are mixing analysis.

You’ve specified ‘treatment’ as fixed and ‘colony’ as random. In this analysis, it is reasonable to perform posthoc comparisons on treatment, but not on colony. Colony is a random variable and each colony is simply drawn from a larger pool, one just as likely as the other. 

The Anova table based on a mixed model only reports fixed effects, and that is proper. If you want to get an estimate of how much variation is associated with colonies, use 

summary(fit_life)
or
VarCorr(fit_life)

This will report the variance associated with colonies, and you might judge from the magnitude of this term how different are the colonies - how variable is your population of colonies. The caveat is that with only 3 colonies, you might not get an accurate estimate.

Peter

> On Dec 7, 2015, at 5:02 AM, Sophie Waegebaert <sophie.waegebaert at gmail.com> wrote:
> 
> 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]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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