[R] lmer() vs. lme() gave different variance component estimates

array chip arrayprofile at yahoo.com
Mon Sep 20 20:09:58 CEST 2010


Thank you Peter for your explanation of relationship between aov and lme. It 
makes perfect sense. 


When you said "you might have computed the average of all 8
measurements on each animal and computed a 1-way ANOVA" for treatment effect, 
would this be the case for balanced design, or it is also true for unbalanced 
data?

Another question is if 1-way ANOVA is equivalent to mixed model for testing 
treatment effect, what would be reason why mixed model is used? Just to estimate 
the variance components? If the interest is not in the estimation of variance 
components, then there is no need to run mixed models to test treatment effects?

And my last question is I am glad to find that glht() from multcomp package 
works well with a lmer() fit for multiple comparisons. Given Professor Bates's 
view that denominator degree's of freedom is not well defined in mixed models, 
are the results from glht() reasonable/meaningful? If not, will the suggested 
1-way ANOVA used together with glht() give us correct post-hoc multiple 
comparsion results?

Thank you very much!

John





----- Original Message ----
From: Peter Dalgaard <pdalgd at gmail.com>
To: array chip <arrayprofile at yahoo.com>
Cc: r-help at r-project.org; r-sig-mixed-models at r-project.org
Sent: Sat, September 18, 2010 1:35:45 AM
Subject: Re: [R] lmer() vs. lme() gave different variance component estimates


For a nested design, the relation is quite straightforward: The residual
MS are the variances of sample means scaled to be comparable with the
residuals (so that in the absense of random components, all
MS are equal to within the F-ratio variability). So to get the id:eye
variance component, subtract the Within MS from the id:eye MS and divide
by the number of replicates (4 in this case since you have 640
observations on 160 eyes) (14.4 - 0.01875)/4 = 3.59, and similarly, the
id variance is the MS for id minus that for id:eye scaled by 8:
(42.482-14.4)/8 = 3.51.

I.e. it is reproducing the lmer results above, but of course not those
from your original post.

(Notice, by the way, that if you are only interested in the treatment
effect, you might as well have computed the average of all 8
measurements on each animal and computed a 1-way ANOVA).

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list