Random effects that are related to fixed effects I am trying to compute a generalized linear mixed model whith my data. My response variable is the presence/ausence of copulation call in each copulation. I have 400 copulations produced by 30 different females and each one contributes disproportionally to the data, so I was controlling female ID as random effect. My predictor is male ranking, however, each female ONLY copulates with her leader male. Then, I was wondering if I can compute this model due to female ID is somehow related to male ranking as there is not variability between my predictor across each female.
Thanks!

As I understand it, you have nested data:

*

*8 males, that differ in rank

*

*multiple females for each male

*

*multiple data points (copulations) for each male-female pair





This model can be estimated just fine, e.g. (using lme4)
glmer(call_present ~ 1 + male_rank + (1|female_id), family = binomial)

The intercept term that varies across females, (1|female_id),
captures how the log-odds of a call occuring for female $f$, who is paired with male $m$, differs from the average log-odds for all females paired with that male.
