I am attempting to do a power analysis for a mixed-effects model using the development version of lme4 and this tutorial. I notice in the tutorial that lme4 throws a convergence error:
## Warning: Model failed to converge with max|grad| = 0.00187101 (tol =
## 0.001)
The same warning comes up when I run the code for my dataset, with:
## Warning message: In checkConv(attr(opt, "derivs"), opt$par, checkCtrl =
control$checkConv, :
Model failed to converge with max|grad| = 0.774131 (tol = 0.001)
The estimates from a regular glmer call with this updated version are also slightly different from when I was using the updated CRAN version (no warnings in that case). Any idea as to why this might be happening?
EDIT
The model I tried to specify was:
glmer(resp ~ months.c * similarity * percSem + (similarity | subj), family = binomial, data = myData)
The dataset I have has one between-subjects (age, centered), and two within-subjects variables (similarity: 2 levels, percSem: 3 levels) predicting a binary outcome (false memory/guess). Additionally, each within-subjects cell has 3 repeated measures. Thus, there exists a total of 2 x 3 x 3 = 18 binary responses for each individual and 38 participants total.
structure(list(subj = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 26L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 28L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 32L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 33L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 34L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 35L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 36L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 37L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L, 38L), .Label = c("09A", "10", "11", "12", "12A", "13", "14", "14A", "15", "15A", "16", "17", "18", "19", "1A", "2", "20", "21", "22", "22A", "23", "24", "25", "26", "27", "28", "29", "3", "30", "31", "32A", "32B", "33", "4B", "5", "6", "7", "8"), class = "factor"), months.c = structure(c(-9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 2.18421052631579, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, 11.1842105263158, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -3.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 1.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -10.8157894736842, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, -7.81578947368421, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 9.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, 6.18421052631579, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -2.81578947368421, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, -0.815789473684205, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, -9.81578947368421, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 8.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 3.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, 5.18421052631579, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.81578947368421, -1.8157894736