I have a binomial mixed effects model that was fitted as follows:
Exp1recog <- glmer(acc ~ neighb*(time+vocab) + (1+neighb|ID) + (1+vocab+time|item), data = recog, family = binomial, control = glmerControl(optimizer = "bobyqa", optCtrl = list(maxfun = 2e5)))
(It predicts performance in a recognition task based on two within-subjects manipulations - neighb, time - and individual vocabulary ability.)
At the time, the vocabulary variable (continuous) was centered and scaled as follows:
recog$vocab <- scale(recog$vocabRaw, center = TRUE, scale = TRUE)
I had written the scaled variable out to a csv file so that all the information for that particular analysis was together in one file. Now I'm tidying my code, I want to keep this information separate and create the centered scaled variable within the analysis script. This should be fine - I am using identical code to do so, and have done this with all my other analyses. However, this model is now failing to converge when using the new variable computed this way (but still converges with the variable imported from the csv).
Can anyone please offer any suggestions why?! The two vocabulary variables look identical, and I have ensured both are numeric. However, if I use a logical to test for equality between the two it returns false, and there are minuscule differences (biggest = 0.0000000004801795) between the two, I'm assuming due to rounding in the csv file. I can't see that those differences should cause problems? What else should I be checking?
I'm waiting for the moment when it's something obvious staring me in the face, but it's been a few days now and I'm baffled...
Many thanks in advance.