Skip to content
Prev 173821 / 398503 Next

dispcrepancy between aov F test and tukey contrasts results with mixed effects model

lbaril at montana.edu wrote:
This is tricky to say in a few lines, but the basic idea of a random 
effects model is that the site averages vary more than they should 
according to within-site variability. In the balanced case (equal 
number of observations per site), it turns out that the mixed-effects 
analysis is _equivalent_ to modeling the site averages. This is not 
ignoring the random effects of site; rather, it is coalescing it with 
the residual since the variance of a site average is v_site + 1/k v_res 
where k is the number of within-site observations.

In the unbalanced case it is not strictly correct to analyze averages, 
because thy have different variances. However, the differences can be 
slight (when the k's are similar or v_site dominates in the above formula).

A side effect of looking at averages is that you are fitting a plain lm 
model rather than lme and that glht in that case knows how to handle the 
degrees of freedom adjustment. (Assuming that the averages are normally 
distributed, which is as always dubious; but presumably, it is better 
than not correcting at all.)