I have a dataset which contains data on MZ twins, DZ twins and unrelated individuals. The predictor and response are binomial variables and the effect size of the predictor may vary depending on the zygosity, i.e. MZ twins have a different association between the predictor and the response than for example DZ twins. Before I was modelling the relationship for these three groups separately, including random effect of pairs (1|pairID).
y = glmer (x+(1|pair), family=binomial, data=twindata
But I have to estimate AND compare these effects among these three groups, and I am struggling with writing a formula for this case. Do I need just a dummy variable for the zygosity group, or is it an interaction term, or is it another random effect? I would appreciate your help!