I'm working on a dataset of ~2900 fish, where the visually estimated sex was compared to the true sex. In about 10% of the cases (≈260 fish), the estimation was wrong (deviation = TRUE).
I'd like to model the probability of a wrong estimation (i.e., deviation = TRUE/FALSE) depending on: the true sex of the fish (estimation is expected to be more accurate in females), fish length, and season (and potentially other predictors/interactions).
A few fish (~100 individuals) were measured repeatedly, while the majority were only measured once. Therefore, I want to include Fish_ID as a random effect to account for repeated measures.
I'm currently using a binomial GLMM with logit link in glmmTMB as follows:
mod_glmmTMB <- glmmTMB(
Deviation ~
True_Sex # H1: deviation depends on true sex
+ Season_cat # H2: deviation depends on season
+ Length # H3: deviation depends on fish length
+ Length * True_Sex # H1b: interaction effect
+ Length * Season_cat # H4: seasonal differences in length effect
+ (1 | Fish_ID),
data = final_df,
family = binomial(link = "logit")
)
However, including the random effect (1 | Fish_ID) causes the fit leading to underdispersion and the plot of the dispersion of residuals is not what would expect (checked with DHARMa). This is a similar residual patterns like generated from including an observation level random effect as tested in this specific model (1|rowID).
Here the dispersion of the residuals with the random effect included:
and the QQ-plot:
And this is the plot without the random effect included: 
So, I am quite happy with the model fit without the random effects where also the parameter estimates make sense to me. However, including the random effect somehow distorts everything and I am not sure what are the steps to diagnose these issues and whether I should abstain from including the random effect, despite having repeated measures in some of my cases?