I recently tested some participants on a navigation task. The success rate in the navigation task is a binomial record of pass (1) and fail (0). I assessed participants in different environmental blocks. I also administered a mental rotation test (MRT). My goal is to see the interaction effect of MRT and blocks on success rate. However, sex/gender of the participants has a significant relationship with success rate. My question is how to control for this variable in my GLMM model. I have a possible model but I am not sure if it is correct.
Success rate data= binomial (1 or 0), Block data = categorical(B1, B2, B3, B4), MRT data = integer between 1 to 12, Sex data = (1 or 0)
I normalized the data before applying the model.
note:I had a repeated measure design as each participant is tested in different blocks.
model1 <- glmer(Success ~ Block * MRT + (1|sex) + (1|Subject),
data = data, family = "binomial")