[R] Tukeys after(g)lmer

Henrik Thurfjell Henrik.Thurfjell at vfm.slu.se
Thu Oct 28 10:12:17 CEST 2010


Hello, I have a model I made with a binomially distributed response, 2 vectors and two factors with 5 and 12 levels respectively, and a random effect (intercept). What I am interested in is doing a post-hoc test to tell which levels of the factors differ from each other.

crfk<-lmer((Ro~1+mhr+tra+h+m+(1|PubName)),
family=binomial,data=t1)

Ro is binomial

mhr is a vector

tra is a vector

h is a factor

m is a factor

PubName is a factor(obviously)



I have found this;

https://stat.ethz.ch/pipermail/r-help/attachments/20081223/f3dd4d21/attachment.pl

"These work:
glht(mod1, linfct=mcp(category="Tukey")
glht(mod1, linfct=mcp(comp="Tukey")"

And figured out as much as that the problem is my binomial response.

Now I am trying to weigh my alternatives, and find the best way to present the data.

As far as I have read, it seems post-hoc tests are not implemented (yet?), maybe due to that they are "murky at best" in theese circumstances at least according to what I could read of the net.

An alternative would be to re fit the model with other contrasts (shifting the base in the pre specified contrasts would do the trick, or specifying not orthogonal tukey contrasts going from high to low estimates) The third alternative would be to just fit some other orthogonal contrasts structure, but that would not make all the comparisons I am interested in.

A third option is to do a stepwise deletion and combine the closest levels and test the models in a likelihood ratio test (models fit with ML since the fixed effects change) and see which could be combined.

Are there better alternatives?

/Henrik



More information about the R-help mailing list