[R-sig-ME] differing variances within different random effects levels
Ben Bolker
bbolker at gmail.com
Mon Feb 14 21:53:52 CET 2011
This is a question that's been bothering me for a while. The answer
might be "read sections 4.2.2 and 4.2.3 of Pinheiro and Bates 2000
again, more carefully", but if anyone has done this before I wouldn't
mind some hints ...
Consider a simplified version of the previous poster's example.
Suppose I have a randomized block design where T treatments are done for
each of N individuals within each of S species. My basic model for this
would be
response~treatment+(treatment|species/indiv)
(or fixed=response~treatment, random=~treatment|species/indiv in lme)
which would give me random effects
1|species
1|indiv:species
treatment|species
treatment|indiv:species
(and correlations between intercept and treatment effects at species and
indiv:species level).
Suppose now that I think the *variance* among individuals varies among
species. As far as I can tell, lme/lmer assume that this variance is
constant across species. If I wanted variance across *observations*
(i.e. residual variance) to vary across species I could do it via
something like weights=varIdent(~species), but this only works for
residual variance.
I suspect I could work out some way to do this with MCMCglmm, and I
don't have an immediate need for it, but I thought I would ask ...
thanks
Ben Bolker
More information about the R-sig-mixed-models
mailing list