I'm trying to do a Dunnett's test on a linear mixed model using lme4 and glht. I set up and ran the model as below
Untransformed.lmer <- lmer(Sum ~ Treatment + (1|Block), data = EggCounts_poolSUM)
anova(Untransformed.lmer)
summary(glht(Untransformed.lmer, linfct = mcp(Treatment = 'Dunnett'), alternative = 'less'))
And when I run that I get the following output
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Dunnett Contrasts
Fit: lmer(formula = Sum ~ Treatment + (1 | Block), data = EggCounts_poolSUM)
Linear Hypotheses:
Estimate Std. Error z value Pr(<z)
75 - 0 >= 0 -914.2 911.6 -1.003 0.372
150 - 0 >= 0 -1207.4 911.6 -1.325 0.243
300 - 0 >= 0 -2162.2 911.6 -2.372 0.030 *
600 - 0 >= 0 -1446.3 911.6 -1.587 0.160
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported -- single-step method)
Can someone explain how all treatments could end up with the same Std. error? Is there something I'm doing wrong?
The Dunnett standard error for treatment
i
issqrt(s2) * sqrt(1/ni + 1/n0)
wheres2
is the pooled variance estimate,ni
is the number of observations for treatmenti
andn0
is the number of observations for the reference group. So the standard errors are all the same in the case when theni
's are equal. This is likely the case for your data.