Hi everyone, 

I'm still pretty new to linear mixed models and I'm trying to understand how to use glht() to compare different levels of an independent variable. Since I got some strange results using my data, I played around a bit with the ergoStool data. I created a simple lmer model and tried glht() with and without multiple comparison procedures. I'm a bit puzzled by how different the output is. Can anyone explain what exactly happens when you add mcp, and why the results are so different specifically for the second and third contrast? 

Thanks in advance! 

Flora 

> # create lmer model 
> lmer.m <- lmer(effort ~ Type + (1|Subject), data = ergoStool, REML = FALSE) 
> 
> # create contrast matrix 
> K <- rbind(c(0,1,-1,0),c(1,0,-1,0),c(1,0,0,-1)) 
> 
> # test as planned contrasts 
> lmer.planned.K <- glht(lmer.m,linfct= K) 
> summary(lmer.planned.K) 

Simultaneous Tests for General Linear Hypotheses 

Fit: lmer(formula = effort ~ Type + (1 | Subject), data = ergoStool, 
REML = FALSE) 

Linear Hypotheses: 
Estimate Std. Error z value Pr(>|z|) 
1 == 0 1.6667 0.4890 3.408 0.0016 ** 
2 == 0 6.3333 0.8793 7.203 <0.001 *** 
3 == 0 7.8889 0.8793 8.972 <0.001 *** 
--- 
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
(Adjusted p values reported -- single-step method) 

> 
> # test as posthoc comparisons 
> lmer.posthoc.K <- glht(lmer.m,linfct=mcp(Type = K)) 
> summary(lmer.posthoc.K) 

Simultaneous Tests for General Linear Hypotheses 

Multiple Comparisons of Means: User-defined Contrasts 


Fit: lmer(formula = effort ~ Type + (1 | Subject), data = ergoStool, 
REML = FALSE) 

Linear Hypotheses: 
Estimate Std. Error z value Pr(>|z|) 
1 == 0 1.6667 0.4890 3.408 0.0017 ** 
2 == 0 -2.2222 0.4890 -4.544 <0.001 *** 
3 == 0 -0.6667 0.4890 -1.363 0.3935 
--- 
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 




	[[alternative HTML version deleted]]

