Model failed to converge in lme4::glmer() when the a factor is centered or releveled

I'm running a mixed-effects model using glmer() function. The modeling works well with R's default dummy coding. But if I center or relevel a factor of 2 levels, the model failed to converge. I am wondering why.

The data is here.

Here is the code for the model without centering or releveling the factor "Memory":

model_default <- glmer(ACC ~ Memory * Group + (1|Subject) + (1+Memory|item), family = "binomial", data = df)


The model converges with the above code. But the model failed to converge after centering the factor "Memory":

c1 <- c(-0.5, 0.5)
contrasts(df\$Memory) = cbind(c1)
model_center <- glmer(ACC ~ Memory * Group + (1|Subject) + (1+Memory|item), family = "binomial", data = df)


If I relevel the factor "Memory", the model failed to converge either:

df$$Memory <- factor(df$$Memory, levels = c("Y", "X"))
model_relevel <- glmer(ACC ~ Memory * Group + (1|Subject) + (1+Memory|item), family = "binomial", data = df)

• I tried all three versions of your model with lme4::glmer and none converged. Did you specify any additional arguments? – dipetkov Mar 3 at 21:05
• No, I didn't. I just downloaded the data and tried the above exact codes again, and I got the same problem as described above: The first version did not give a warning message about converge, but the rest two versions did. – mooninnap Mar 5 at 1:06