I have a glmer model where I want to predict the 'outcome' is 0 or 1 (incorrect or correct response) with three predictors: 'agent' (levels 1,3) and 'type' (levels action, abstract) are categorical variables and 'm' is numeric variable.
fit = glmer(outcome ~ agent*type*m+(1|ID)+(1|item),
data = df,
family = binomial,
control = glmerControl(optimizer = "bobyqa"))
I found a sig. agent by type by m interaction and performed post-hoc with emtrends
test(emtrends(fit, pairwise ~agent|type, var = "m", adjust = "bonf",type = "response"))
I would like to know if:
- the code is correct for this type of glmer model (can be improved?)
- if so, if the interpretation of the output is correct. I expect the probability of a correct answer for condition 'agent 1', within 'type abstract', to decline by 14.14% for 1 unit of increase in 'm' and this trend is sig. (p < 0.0001). Same way of interpretation for the other trends but for 'agent 1' within 'type action' where the trend is not sig. When comparing the trends with contrast, only the comparison 1-3 within 'type action' is significant, showing that the two trends are different.
Thank you very much for your help!
