[R] Question about lrandom effects specification in lme4
bates at stat.wisc.edu
Fri Dec 5 23:35:22 CET 2008
On Thu, Dec 4, 2008 at 6:21 PM, Bert Gunter <gunter.berton at gene.com> wrote:
> Suppose I have 3 random effects, A,B, and C. Using the older lme() function
> (in nlme) it was possible (using the pdMat classes) to specify that they are
> uncorrelated with identical variances. Is it possible to do this with lmer?
> My understanding is that if I specify them as
> lmer( y ~ ... + (A|Grp) + (B|Grp) + (C|Grp))
> then they are uncorrelated but have different variances.
At present there isn't an easy way to do what you want to do but I am
working on modifications that would allow such changes. You would
need to define a new reCovFac (random-effects covariance factor)
class. In this case it would be straightforward because the
covariance factor for the combined terms is a multiple of the
If you are feeling adventurous contact me off-list and I will describe
how I think this could be done using the code in the "allcoef" branch
of the SVN tree at R-forge. Installing that branch is not for the
faint of heart. It is seriously broken right now but I'm confident
I'll get it all back together in the not-too-distant future.
> Motivation: I'd like to use lmer instead of lme for fitting smoothing
> splines to longitudinal data.
> Bert Gunter
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help