I have never run a logistic regression analysis (linear mixed-effects model) in R, but it seems to be a reasonable approach to answer the question as to what extent condition BB affects the discrimination ability of the vowels i and e compared to condition NB.
The dependent variable has two levels (either I or E), there are six predictors.
R throws warning messages when running the logistic regression.
For the first model, I had:
glmer1 <- glmer(response_converted ~ (1|subject_nr) + condition + continuum_step + block_order + vowel_carrier + stimulus, data = data, family = binomial)
I got a warning in R: “fixed-effect model matrix is rank deficient so dropping 3 columns / coefficients”
Hence, I ran
allFit(glmer1)
The outcome was that two optimizers failed. Therefore, I removed fixed effects one by one (1st “block_order”, 2nd “vowel_carrier”, 3rd “stimulus”) until I did not get the warning. The final model had the following variables:
glmer4 <- glmer(response_converted ~ (1|subject_nr) + condition + continuum_step, data = data, family = binomial)
I added “stimulus” as a random effect in model 5:
glmer5 <- glmer(response_converted ~ (1|subject_nr) + (1|stimulus) + condition + continuum_step, data = data, family = binomial)
I compared glmer4 and glmer5 with the anova() function:
anova(glmer4, glmer5, test = "Chisq")
glmer5 appeared to be the better fit.
Does this procedure make sense? Any advice?