[R-sig-ME] query on binomial glm of pollination experiment

David Duffy D@v|d@Du||y @end|ng |rom q|mrbergho|er@edu@@u
Fri Feb 21 01:56:11 CET 2020


> ________________________________________
> From: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> on behalf of Mollie Brooks 

> I don’t have much time right now, but I was able to improve the model (including convergence) with a few small changes. I 
> think that having nofruits as a separate object may have been causing a problem in the inner-workings of the software. 
> So I moved it to a column of sistrep. I also reordered the treatment levels so that control is the baseline. Then the model 
> appears to run in lme4 with a warning or in glmmTMB without a warning. It looks like some of the coefficients differ 
> between the two models.

> sistrep$nofruits <- sistrep$flowers-sistrep$fruits
> sistrep$treatment=factor(sistrep$treatment, levels=c("control", "automan", "cruzman", "tul", "voile"))

> library(glmmTMB)
> M3 <- glmmTMB(cbind(fruits, nofruits) ~ treatment + (1|plant), data =
> sistrep, family = "binomial")
> summary(M3)

>> M2 <- glmer(cbind(fruits, nofruits) ~ treatment + (1|plant), data =
> > sistrep, family = "binomial")

I just ran stan_glmer(), on the off-chance it would be better behaved. 
library(rstanarm)
M4 <- stan_glmer(cbind(fruits, flowers-fruits) ~ treatment + (1|plant), data=x, family=binomial())

The treatment estimates (and SEs) were very similar to those from glmer(), except for "automan", which I presume is what makes glmer unhappy. 



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