[R-sig-ME] Crossed random effects

Douglas Bates bates at stat.wisc.edu
Tue Mar 13 20:31:56 CET 2007

On 3/13/07, Kevin Wright <kw.statr at gmail.com> wrote:
> I am confused by some apparent contradictions about fitting crossed
> random effects in software.  Consider this quote from
> http://www.mpi.nl/world/persons/private/baayen/publications/baayenDavidsonBates.pdf
> "To our knowledge, the only software currently available for fitting
> mixed-effects models with crossed random effects is the lme4 package"

That statement should have been more carefully worded.  It is in
reference to the types of experimental situations described in that
paper where random effects are associated with subject and item,
subjects are crossed with item and the numbers of both the subjects
and the items can be very large.

> Yet, nlme and GLIMMIX appear to claim that crossed-random effects can
> be fit by those respective tools:
> In Mixed Effects Models in S and S-Plus:
> "The crossed random-effects structure is represented in lme by a
> combination of pdBlocke3d and pdIdent objects" (page 163)

It is possible to fit a model with crossed random effects with lme
provided that the number of levels of both of the crossed factors is
small.  Otherwise you end up with huge, sparse model matrices that are
being treated as dense matrices and you quickly run out of memory or
time or both.

Really, doesn't a random effects specification like
pdBlocked(list(pdIdent(~ rows - 1), pdIdent(~ columns - 1))) smell
like a kludge to you?

> http://support.sas.com/rnd/app/papers/glimmix.pdf
> "The GLIMMIX procedure, on the other hand, determines by default the
> marginal log likelihood as that of an approximate linear mixed model.
> This allows multiple random effects, nested and crossed random
> effects, multiple cluster types, and R-side random components."  [and]
>  "Example 2. Mating Experiment with Crossed Random Effects"

I think that several readers of this list could tell you war stories
of trying to fit models with crossed random effects using SAS PROC
MIXED or SAS PROC NLMIXED versus fitting the same model in lmer or
lmer2.  You are correct that one can specify a model with crossed
random effects in SAS PROC MIXED and that we overstated the uniqueness
of the capabilities of lmer to fit such models.  However, if you want
to try to fit such a model in SAS PROC MIXED when you have large
numbers of subjects and large numbers of items you had better be
prepared to wait for a long time.

> Are these three quotes using different definitions of "crossed random
> effects"?  Have I taken the quotes out of context?  Any clarifications
> would be appreciated.
> Thanks,
> K Wright
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

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