[R-sig-ME] Correction! glht: multiple comparisons, full cross, 2 treatments

Colin Wahl biowahl at gmail.com
Sun Oct 30 00:09:28 CEST 2011


I apologize for the incomplete email, I'm having formating
difficulties. Here is my second try:

I would like to compare between all levels of each treatment cross. I
have two treatments, one with 4 levels and the other with two levels.
I am using glmer with binomial errors.

model:
modelEPT<-glmer(EPT ~ wsh*rip + (1|stream) + (1|stream:rip) + (1|obs),
data=ept, family=binomial(link="logit"))

My code is as follows:

Treatment 1:
glht(modelEPT, linfct=mcp(wsh="Tukey"))
This gives me contrasts for treatment 1 (4 levels)
(i.e. lvl 1 vs 2, 1 vs 3, 1 vs 4, 2 vs 3, 2 vs 4, 3 vs 4)

Treatment 2:
c1 <- rbind ("C: F vs. NF Rip Effect" = c(0,0,0,0,1,0,0,0),
     "D: F vs. NF Rip Effect" = c(0,0,0,0,1,1,0,0),
     "F: F vs. NF Rip Effect" = c(0,0,0,0,1,0,1,0),
     "G: F vs. NF Rip Effect" = c(0,0,0,0,1,0,0,1))
glht(modelEPT, c1)
This gives me contrasts for treatment 2 within each level of treatment 1

I would like to get contrasts for levels of treatment 2 between levels
of treatment 1. Basically I would like an 8-way cross.


The argument linfct=mcp(model_coef="Tukey") only accepts coefficients
from the model. I tried using a coefficient cross wsh*rip, but that
does not work. I am assuming I'll have to use some variation of c1
with logical arguments for hypothesis tests, but I dont know how to
interpret them, and have not found a resource that will give me a
simple answer. Does anyone have any advice for how to do this with
glht()

Thank you,

Colin Wahl
Graduate Student
Biology Dept.
Western Washington University



sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets
methods   base

other attached packages:
[1] multcomp_1.2-7     survival_2.36-9    mvtnorm_0.9-9991
lme4_0.999375-40   Matrix_0.999375-50
[6] lattice_0.19-30

-- 
CW




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