[R-sig-ME] glmer on binomial data with 1 random effect - get p values from anova table ?

Ben Bolker bbolker at gmail.com
Tue Dec 10 03:36:33 CET 2013


On 13-12-09 08:17 PM, marieline gentes wrote:
> Dear list,
> 
> I'm fairly new with mixed models and just starting to use glmer. I
> have a very basic question, which seems so basic I,m almost
> embarrased to ask.
> 
> I work with habitat use data (summarized binomial data) which I
> fitted in a mixed model of the binomial family with a random factor
> accounting for repeated sampling of the same individual.We simply
> want basic descriptions of the data - effects of sex and year on the
> proportion of time spent in each habitat.
> 
> The code is as follow (for a simple model without interaction):
> 
> Colony.glmerSexYear <- glmer(cbind(ColoYes.allnoF24, ColoNo.allnoF24)
> ~ year.coded + sex + (1| Bague), family=binomial, data=mydata)
> 
> I simply want to report the fact that my predictor 'year'
> (categorical, three levels) is not significant. if I use the anova
> command anova(Colony.glmerSexYear) I get an anova table with degrees
> of freedom and  F values, but no p values
> 
> Analysis of Variance Table Df Sum Sq Mean Sq F value year.coded  2
> 6.8140  3.4070  3.4070 sex         1 9.0351  9.0351  9.0351
> 
> 
> What is the proper way to obtain those missing p values ? or should I
> not use this anova table at all ? I was also suggested to conduct a
> likelyhood ratio test, but I don't have enough statistical background
> (yet) to do this without external help.


  Take a look at the ?pvalues help page in the lme4 package.
  I'm a little surprised that you're getting that particular anova()
table out of lme4 for a glmer() model -- can you give a *little* more
detail about what you're doing?  (If you show the glmer() statement and
the results of sessionInfo(), in particular the versions of packages you
have loaded, that should be enough for now ...)



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