[R] New member with question on multiple comparisons in mixed effects models
gmatessi at bio.ku.dk
Wed Sep 10 00:42:08 CEST 2008
Dear fellow R.users/.lovers,
I am very new to both R and this list, so I hope you will be patient with me in the beginning if my enquiries are inappropriate/unclear.
I am trying to perform some rather complex statistical modelling using mixed-effects models.
I have, after a rather difficult beginning, finally boiled down my model (using the lme function in nlme) to a couple of fixed effects and their interactions, plus a couple of nested random effects.
For the moment I will not include the details because the dataset is rather large and without it is difficult to be more specific, but I can provide them if requested.
My question is maybe a bit trivial, but I would like to get out of the model the pairwise comparisons for all the factor levels using TukeyHSD, but when I try to do this using the "glht" method in the multcomp library I get an error message which seems to indicate a wrong synthax, yet I think I am following the instructions given on the package documentation. Below are the code lines and the R reply.
> glht(inner.exch.M9.lme,linfct=mcp(Personality:Day = "Tukey"))
Error: unexpected '=' in "glht(inner.exch.M9.lme,linfct=mcp(Personality:Day ="
(inner.exch.M9.lme is the model object, Personality and Day are the two fixed factors the levels of which I want to compare)
I also tried without the interaction symbol and only one factor, with the same result.
As I understand it, the multcomp package is new so maybe the method is not implemented for complex designs yet.
Any suggestion will be appreciated (including such as "read the instructions" if they can point me to such instructions!).
Thank you very much in advance and all the best
More information about the R-help