J'essaie de faire une analyse de puissance pour un modèle à effets mixtes en utilisant la version de développement de lme4 et this tutorial. Je remarque dans le tutoriel que lme4 lance une erreur de convergence:
## Warning: Model failed to converge with max|grad| = 0.00187101 (tol =
## 0.001)
Le même avertissement apparaît lorsque j'exécute le code de mon ensemble de données, avec:
## Warning message: In checkConv(attr(opt, "derivs"), opt$par, checkCtrl =
control$checkConv, :
Model failed to converge with max|grad| = 0.774131 (tol = 0.001)
Les estimations d'un appel glmer régulier avec cette version mise à jour sont également légèrement différentes de lorsque j'utilisais la version CRAN mise à jour (aucun avertissement dans ce cas). Une idée de pourquoi cela pourrait arriver?
[~ # ~] modifier [~ # ~]
Le modèle que j'ai essayé de spécifier était:
glmer(resp ~ months.c * similarity * percSem + (similarity | subj), family = binomial, data = myData)
L'ensemble de données que j'ai possède une entre les sujets (âge, centré) et deux variables intra-sujets (similitude: 2 niveaux, percSem: 3 niveaux) prédisant un résultat binaire (fausse mémoire/supposition). De plus, chaque cellule intra-sujet a 3 mesures répétées. Ainsi, il existe un total de 2 x 3 x 3 = 18 réponses binaires pour chaque individu et 38 participants au 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.81578947368421, -1.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, -6.81578947368421, 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.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, -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.81578947368421, -1.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, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, -8.81578947368421, 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, 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, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, 0.184210526315795, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.81578947368421, -4.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, -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, -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, -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, -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), "`scaled:center`" = 70.8157894736842), similarity = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 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, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 1L), .Label = c("false memory", "guess"), class = "factor")), .Names = c("subj", "months.c", "similarity", "percSem", "resp"), row.names = c(NA, -684L), class = "data.frame")
tl; dr cela ressemble à un faux positif - je ne vois pas de différences particulièrement importantes entre les ajustements avec une variété d'optimiseurs différents, bien qu'il semble que les valeurs aberrantes soient les valeurs intégrées Optimiseur Nelder-Mead et nlminb; bobyqa intégré, et bobyqa et Nelder-Mead du package nloptr, donnent des réponses extrêmement proches et aucun avertissement.
Mon conseil général dans ces cas serait d'essayer de ré-ajuster avec control=glmerControl(optimizer="bobyqa")
; nous envisageons de passer à l'utilisation de bobyqa
par défaut (cette question augmente le poids des preuves en sa faveur).
Je mets la sortie dput
dans un fichier séparé:
source("convdat.R")
Exécutez toute la gamme des optimiseurs possibles: N-M et bobyqa intégrés; nlminb et L-BFGS-B à partir de la base R, via le package optimx
; et les versions nloptr
de N-M et de bobyqa.
library(lme4)
g0.bobyqa <- glmer(resp ~ months.c * similarity * percSem +
(similarity | subj),
family = binomial, data = myData,
control=glmerControl(optimizer="bobyqa"))
g0.NM <- update(g0.bobyqa,control=glmerControl(optimizer="Nelder_Mead"))
library(optimx)
g0.nlminb <- update(g0.bobyqa,control=glmerControl(optimizer="optimx",
optCtrl=list(method="nlminb")))
g0.LBFGSB <- update(g0.bobyqa,control=glmerControl(optimizer="optimx",
optCtrl=list(method="L-BFGS-B")))
library(nloptr)
## from https://github.com/lme4/lme4/issues/98:
defaultControl <- list(algorithm="NLOPT_LN_BOBYQA",xtol_rel=1e-6,maxeval=1e5)
nloptwrap2 <- function(fn,par,lower,upper,control=list(),...) {
for (n in names(defaultControl))
if (is.null(control[[n]])) control[[n]] <- defaultControl[[n]]
res <- nloptr(x0=par,eval_f=fn,lb=lower,ub=upper,opts=control,...)
with(res,list(par=solution,
fval=objective,
feval=iterations,
conv=if (status>0) 0 else status,
message=message))
}
g0.bobyqa2 <- update(g0.bobyqa,control=glmerControl(optimizer=nloptwrap2))
g0.NM2 <- update(g0.bobyqa,control=glmerControl(optimizer=nloptwrap2,
optCtrl=list(algorithm="NLOPT_LN_NELDERMEAD")))
Résumez les résultats. Nous recevons des avertissements de nlminb
, L-BFGS-B
, et Nelder-Mead (mais la taille du gradient max abs est la plus grande de Nelder-Mead)
getpar <- function(x) c(getME(x,c("theta")),fixef(x))
modList <- list(bobyqa=g0.bobyqa,NM=g0.NM,nlminb=g0.nlminb,
bobyqa2=g0.bobyqa2,NM2=g0.NM2,LBFGSB=g0.LBFGSB)
ctab <- sapply(modList,getpar)
library(reshape2)
mtab <- melt(ctab)
library(ggplot2)
theme_set(theme_bw())
ggplot(mtab,aes(x=Var2,y=value,colour=Var2))+
geom_point()+facet_wrap(~Var1,scale="free")
Juste les "bons" ajustements:
ggplot(subset(mtab,Var2 %in% c("NM2","bobyqa","bobyqa2")),
aes(x=Var2,y=value,colour=Var2))+
geom_point()+facet_wrap(~Var1,scale="free")
Coefficient de variation des estimations entre optimiseurs:
summary(cvvec <- apply(ctab,1,function(x) sd(x)/mean(x)))
Le CV le plus élevé est pour months.c
, ce qui n'est encore qu'environ 4% ...
Les log-vraisemblances ne diffèrent pas beaucoup: NM2 donne le maximum de log-vraisemblance, et tous les "bons" sont très proches (même les "mauvais" sont au plus 1% différents)
likList <- sapply(modList,logLik)
round(log10(max(likList)-likList),1)
## bobyqa NM nlminb bobyqa2 NM2 LBFGSB
## -8.5 -2.9 -2.0 -11.4 -Inf -5.0