Skip to content

Significance of fixed factors using glmer

3 messages · John Fox, Julia Chacon Labella, Ben Bolker

#
Dear Silvia,

Both lmerTest::anova() and car::Anova() print p-values, so you'll have to provide more information -- ideally a reproducible example demonstrating the problem, or at least the problematic output with p-values absent.

Best,
 John

-----------------------------
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web: socialsciences.mcmaster.ca/jfox/
#
Hi Silvia,

If you have previously loaded other packages like afex package, then
lmerTest cannot work properly and does not give you the p-values.
Try to detach the other packages if it is the case, and let see if it works
now.

Example: detach("package:afex", unload=TRUE)

Or...you can restart your R session and load only the packages you need.
But I would try detach first.

Hope it works!
Julia


2017-12-20 15:43 GMT+01:00 Fox, John <jfox at mcmaster.ca>:

  
    
#
Julia: that's interesting, but can you be more specific? I *never* get
p-values with a single-argument anova(),
but I do get p-values with car::Anova or other methods suggested below:

[1] lmerTest_2.0-36 afex_0.18-0     lsmeans_2.27-61 lme4_1.1-15
[5] Matrix_1.2-12

  Suggestions for improving the text in ?lme4::pvalues will be warmly
appreciated.

  cheers
   Ben Bolker




library(afex)
library(lmerTest)
library(car)
data("cbpp",package="lme4")
g1 <- glmer(cbind(incidence, size-incidence) ~ period + (1|herd),
    family=binomial,data=cbpp)
lme4:::anova.merMod(g1) ## no p-values
anova(g1)  ## from lmerTest: no p-values
find("anova")
## [1] "package:lmerTest" "package:stats"
summary(g1) ## Wald p-values
Anova(g1)  ## Wald (type II) p-values
drop1(g1,test="Chisq")
mixed(cbind(incidence, size-incidence) ~ period + (1|herd),
      family=binomial,data=cbpp, method="LRT")
sessionInfo()




On Thu, Dec 21, 2017 at 5:03 AM, Julia Chacon Labella
<juliachacon at gmail.com> wrote: