Skip to content
Prev 391009 / 398506 Next

linear mixed model using lmer

Well, it is true that when there are only two levels, t-test and F-tests should give identical inferences, I don?t think that?s the problem in this case.
Instead, remember that we can compute variance components from an anova table, if we write out the expected mean squares and solve algebraically. When I run aov on these data, I get
Df Sum Sq Mean Sq F value Pr(>F)
batch        1   1.03   1.035   0.128  0.724
Residuals   22 177.91   8.087    

This would imply a negative variance component estimate for batch, since batch MS is smaller than residual MS. Most mixed model packages constrain variance estimates to be non-negative, so you get 0 from lmer.

It doesn?t help that you only have two levels for batch.  I find negative variance estimates happen more frequently when there are few levels of the effect to be estimated.

Cheers,
Peter C