[R-sig-ME] Nested Effects and Correlation

Ben Bolker bbolker at gmail.com
Mon Mar 11 04:57:36 CET 2013


Pantelis H <kalakouentin at ...> writes:

> 
> Hello,
> 
> I have a question:
> In the case of multiple nested effects one can be provided with
> correlations for a grouping's subgroups; how are these correlations
> computed? 
  
  I'm not quite sure what you mean here.


library(lme4)
example(Pastes)
fm2

gives an example of a model with nested grouping factors.
I see a variance and a (redundant) standard deviation for
each random component (cask within batch, batch, residual error),
but no correlations.
  Looking at the Oats example in the Implementation vignette
http://cran.r-project.org/web/packages/lme4/vignettes/Implementation.pdf
shows the same thing.

> What is the correct reference for the computational calculation
> of the nested random effects and their correlation in lmer()?
> I believe an LDL^t decomposition of a scaled precision matrix might be
> involved but I looked in the three lme4 vignettes, Bates & DebRoy (2004) in
> J. of Multivariate Analysis as well as the DebRoy & Bates' Technical Report
> No. 1076 but none mentions something explicitly (eg. the Implementation.pdf
> vignette specifically sets "corr = FALSE" in the case of nested factors
> actually). Could someone please suggest to me references in regard with
> that?

   Usually corr=FALSE refers to suppressing the printing of
the correlations among _fixed_ effect parameters ... where else are
you looking?

> Only indirect references I could find was: 1. subsection 2.2.7 on Pinheiro
> & Bates "Mixed-Effects Models in S and S-Plus" but even there nothing is
> stated specifically for correlation calculations and 2. the Bell Labs
> Technical Memorandum "Computational Methods for Multilevel Modelling" by
> Bates & Pinheiro that mentions correlations in regard with the Nonlinear
> multilevel model. Additionally both references are mostly referring on
> lme().
> Finally, the "lme4: Mixed-effects modeling with R" book in subsection 3.2.1
> while looking at nested effect correlations it does not provide
> computational aspects of it.

  I can see that you've tried to be very specific (thank you), but
I'm still not sure what you're referring to.  Here are some thoughts:

 * the correlation between _variance estimates_ is not explicitly modeled
in lme4: one might be able to extract them from the Hessian matrix, but
it would be a bit challenging
 * correlations are modeled, by default, among random effects within
the same grouping factor.  For example, on p 17 of the implementation
vignette a correlation is given between the intercept and nitrogen
random effects at the Block level -- it happens to be 1.0 (suggesting
the model is overfitted).  These correlations are directly modeled as
part of the 'theta' vector which contains the elements of the lower
triangle of the Cholesky factor of the relevant L matrix (which is
described on pp. 5-6 of the same vignette).

  Ben Bolker



More information about the R-sig-mixed-models mailing list