I am trying to run a binomial glmm to understand the relationship between various concentrations of a compound sensed by different castes of ants. We have 5 different compound concentrations (a-e), and 3 different castes (min, med, max). We tested this across 3 colonies (two, six, and seven) to see if they were interested in the compound (1 if yes, 0 if no). We listed id as the individual (there are 761).
Our data sheet is set up like this:
We used lme4 and the glmer command:
m <- glmer(Y ~ Conc * (1 + Caste|Colony), data = d, family = binomial) summary(m, corr = FALSE)
When we run this, the readout we get is:
summary(m, corr = FALSE)
Generalized linear mixed model fit by maximum likelihood
(Laplace Approximation) [glmerMod]
Family: binomial ( logit )
Formula: Y ~ Conc * (1 + Caste | Colony)
Data: d
AIC BIC logLik deviance df.resid
1067.2 1118.1 -522.6 1045.2 750
Scaled residuals:
Min 1Q Median 3Q Max
-1.4844 -0.9855 0.7613 1.0076 1.4478
Random effects:
Groups Name Variance Std.Dev. Corr
Colony (Intercept) 0.4529 0.6730
Castemed 0.4387 0.6624 -1.00
Castemin 0.6416 0.8010 -1.00 1.00
Number of obs: 761, groups: Colony, 3
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.09754 0.16571 -0.589 0.5561
Concb -0.05160 0.23068 -0.224 0.8230
Concc 0.21758 0.22971 0.947 0.3436
Concd 0.07658 0.23022 0.333 0.7394
Conce 0.52070 0.23263 2.238 0.0252 *
---
Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1
optimizer (Nelder_Mead) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
I do see concentration E as being significantly different than the others, however we are not seeing any of the interactions by caste and seem to be missing concentration A. I'm not sure if I need to add additional lines of code to get these interaction comparisons? I also would like to know if colony plays a role on the worker preference for the various concentrations. We are pretty sure that caste plays a role on perceptiveness (ie what concentration level they select for) however I feel like perhaps we are missing a key piece of the code to get this. Any help is appreciated!