I am trying to analyse some data using a mixed effect model. The data I collected represent the weight of some young animals of different genotype over time.
I am using the approach proposed here: http://blog.gribblelab.org/2009/03/09/repeated-measures-anova-using-r/
In particular I'm using solution #2
So I have something like
require(nlme) model <- lme(weight ~ time * Genotype, random = ~1|Animal/time, data=weights) av <- anova(model)
Now, I would like to have some multiple comparisons.
multcomp I can do:
require(multcomp) comp.geno <- glht(model, linfct=mcp(Genotype="Tukey")) print(summary(comp.geno))
And, of course, I could do the same with time.
I have two questions:
- How do I use
mcpto see the interaction between Time and Genotype?
When I run
glhtI get this warning:
covariate interactions found -- default contrast might be inappropriate
What does it mean? Can I safely ignore it? Or what should I do to avoid it?
EDIT: I found this PDF that says:
Because it is impossible to determine the parameters of interest automatically in this case, mcp() in multcomp will by default generate comparisons for the main effects only, ignoring covariates and interactions. Since version 1.1-2, one can specify to average over interaction terms and covariates using arguments interaction_average = TRUE and covariate_average = TRUE respectively, whereas versions older than 1.0-0 automatically averaged over interaction terms. We suggest to the users, however, that they write out, manually, the set of contrasts they want. One should do this whenever there is doubt about what the default contrasts measure, which typically happens in models with higher order interaction terms. We refer to Hsu (1996), Chapter~7, and Searle (1971), Chapter~7.3, for further discussions and examples on this issue.
I do not have access to those books, but maybe someone here has?