scores <- c(26, 25, 14, 13, 10, 8, 22, 13, 10, 8, 8, 5,
30, 25, 10, 10, 7, 5, 43, 31, 12, 8, 2, 4,
45, 31, 31, 10, 10, 4, 53, 23, 10, 1, 1, 1,
12, 16, 15, 16, 37, 28, 21, 20, 21, 15, 21, 17,
23, 27, 47, 27, 24, 59, 9, 23, 21, 12, 13, 14,
18, 17, 13, 18, 19, 21, 14, 14, 17, 21, 12, 13)
dat <- data.frame(Subject=rep(c(1,2,3,4,5,6), each=6),
Condition=rep(c("A","B"),each=6*6), Score=scores,
Day=rep(c(1,2,3,4,5,6),times=6))
I thought convergence and singularity issues mostly arise due to overly complex models. However it seems in my case, a simpler model is more problematic than a more complex one:
Simpler model (fails to converge, singular fit):
fm <- lmer(Score ~ Condition + (Condition|Subject), dat)
boundary (singular) fit: see ?isSingular
Warning message:
Model failed to converge with 1 negative eigenvalue: -9.0e-01
More complicated model (no errors or warnings):
fm <- lmer(Score ~ Day*Condition + (Condition|Subject), dat)