[R] "effects" package issue for lme4's lmer()

John Fox jfox at mcmaster.ca
Thu Jan 29 20:36:53 CET 2015

Dear Krisztina,

Thank you for your kind remarks about the effects package.

The issue is almost surely the slow computation of Kenward-Roger standard
errors for the effects, which we compute by default (KR=TRUE) for a linear
mixed model fit by lmer(). This problem is compounded by a bug in
allEffects(), but not effect() or Effect(), that prevents changing KR to

In the development version of the effects package on R-Forge, the default is
changed to KR=FALSE and the bug in allEffects() is fixed. Until the effects
package is updated on CRAN, you should be able to install the development
version from R-Forge via 

install.packages("effects", repos="http://R-Forge.R-project.org")

I apologize for this problem.


> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Krisztina
> Mosdossy
> Sent: January-29-15 10:44 AM
> To: r-help at r-project.org
> Subject: [R] "effects" package issue for lme4's lmer()
> Hello fine R folks,
> I am a big fan of the "effects" package as it enables me to visualize my
> GLMM's quite nicely and with ease. I am, however, unable to find a way to
> use the effect() or allEffects() functions with my recent lmer model.
> I just updated R, lmerTest and effects packages the other day. I am using
> version 3.1.2 (2014-10-31) -- "Pumpkin Helmet", lme4 package version
> effects package version 3.0-3 and lmerTest package version 2.0-20. I am
> a MacBook Pro OS 10.9.5.
> I constructed my model using the lmer() function in the lme4 package as
> as the lmerTest() function:
> m.proc3.2<-
> lmerTest::lmer(Duration~InvertAvg2012+NInvertSample2012+RipeFruit2012
> +AvgFrass2012+FocalDuration+(1|Group/Animal)+(1|Type),
> data=datsc)
> Where "Duration" is a continuous response variable, while each fixed
> explanatory variable is continuous and each random variable is
> I scaled each continuous explanatory variable.
> The problem I am having:
> effect(m.proc3.2)
> or
> allEffects(m.proc3.2)
> provides the lovely "wheel of death", my computer starts heating up and R
> no longer responsive (for this reason I end up having to Force Quit R).
> I also tried the above code without lmerTest() just in case, but the beach
> raises its unforgiving rainbow head (the "wheel of death" returns and I
> to Force Quit R).
> Since updating, I have used the "effects" package with a glmer model I
> and allEffects() works wonders. It's only with the lmer() that I'm having
> issues. I have searched and searched cyberspace and no one else seems to
> be having this problem. In fact, the "effects" package is often
> when seeking visual representation of one's lmer model. Am I missing
> something?
> Thank you for your time!
> Krisztina Mosdossy, M.A.
> Department of Anthropology
> University of Calgary
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

This email has been checked for viruses by Avast antivirus software.

More information about the R-help mailing list