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" 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) 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" 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
Crossed random effects
7 messages · Douglas Bates, Martin Henry H. Stevens, Kevin Wright +3 more
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
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20070313/a4c05978/attachment.pl>
Thanks for the clarification. It is no secret that large plant-breeding programs (both corporate and governmental--see http://www.dpi.nsw.gov.au/__data/assets/pdf_file/113474/annual_report_part_3.pdf) have adopted ASREML, probably due to the "war stories" with crossed random effects that you mention. I have heard several people say that ASREML is often orders of magnitude (100-1000) times better than SAS for handling large datasets with crossed random effects. My limited experience suggests ASREML/Genstat/SAMM and lme4 are in the same order-of-magnitude performance-wise. P.S. I offer sincere appreciation for the "Mixed-effects modeling with crossed random effects for subjects and items" paper, particularly the MCMC approach and the corresponding interpretations and discussions. Very nice. K Wright
On 3/13/07, Douglas Bates <bates at stat.wisc.edu> wrote:
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
On Tue, Mar 13, 2007 at 02:31:56PM -0500, Douglas Bates wrote:
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?
You must have one of those fancy new monitors. Cheers, Andrew
Andrew Robinson Department of Mathematics and Statistics Tel: +61-3-8344-9763 University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599 http://www.ms.unimelb.edu.au/~andrewpr http://blogs.mbs.edu/fishing-in-the-bay/
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20070313/0f2f6e4c/attachment.pl>
Do try glmm.admb() from library(glmmADMB)in R. It is in the development phase with limited functionality for now. However, the results are very fast with large data sets. One can try the base software ADMB implemented in C which is claimed to be very fast. Monica -----Original Message----- From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Doran, Harold Sent: Tuesday, March 13, 2007 3:50 PM To: MHH Stevens; Douglas Bates Cc: r-sig-mixed-models at r-project.org Subject: Re: [R-sig-ME] Crossed random effects I've missed some prior threads on this, please accept my apologies if what I say below has already been noted. It is true that lme in the nlme package and that HLM (stand-alone) can fit models with crossed random effects. Now, I just dare you to try it. mlWin uses an MCMC implementation for crossed random effects (if you want to go down that road). I have some recent experiences fitting models in Stata and in R. Models that took less than 2 minutes in R would take overnight in Stata. A few years back, I also did some comparisons with HLM. For a small data set, a model in lmer that could be fit in less than 1 minute took something like 3 to 4 hours in HLM. In the JSS special edition on psychometrics (forthcoming) Doug, Paul Bliese, Maritza dowling and I estimate the 1PL for items and students that are fully crossed using lmer. The estimates were resolved extremely fast and the data set was rather large. I have simply not found another package that competes with lmer wrt to computational speed for linear or generalized linear mixed models. Harold -----Original Message----- From: r-sig-mixed-models-bounces at r-project.org on behalf of MHH Stevens Sent: Tue 3/13/2007 5:14 PM To: Douglas Bates Cc: r-sig-mixed-models at r-project.org Subject: Re: [R-sig-ME] Crossed random effects Dear Folks, What about specialized stand alone mixed model software, such as HLM? -Hank
On Mar 13, 2007, at 3:31 PM, Douglas Bates wrote:
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
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Dr. Hank Stevens, Assistant Professor 338 Pearson Hall Botany Department Miami University Oxford, OH 45056 Office: (513) 529-4206 Lab: (513) 529-4262 FAX: (513) 529-4243 http://www.cas.muohio.edu/~stevenmh/ http://www.muohio.edu/ecology/ http://www.muohio.edu/botany/ "If the stars should appear one night in a thousand years, how would men believe and adore." -Ralph Waldo Emerson, writer and philosopher (1803-1882) _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models _______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models ######################################################### The information contained in this e-mail and subsequent attachments may be privileged, confidential and protected from disclosure. This transmission is intended for the sole use of the individual and entity to whom it is addressed. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this message in error, please e-mail the sender at the above e-mail address. #########################################################