Question

Currently I'm trying to rerun an old data analysis, binomial glmer model, (from early 2013) on the latest version of R and lme4, because I don't have the old versions of R and lme4 anymore. However, I experience similar warning messages as previous threads by dmartin and carine (first warning message) and other threads outside stack overflow (warnings 2 and 3). These warning messages didn't pop up on the earlier version of R and lme4 I used, so it must have something to do with latest updates?

A subset of my dataset:

    df <- structure(list(SUR.ID = structure(c(1L, 1L, 2L, 2L, 3L, 3L, 1L, 
1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 
3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 
2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 
1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 
3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 
2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 
1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 
3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 
2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 
1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 
3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 
2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 
1L, 2L, 2L, 3L, 3L, 1L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class = "factor"), ValidDetections = c(0L, 
    0L, 6L, 5L, 1L, 7L, 0L, 0L, 5L, 8L, 7L, 3L, 0L, 0L, 1L, 4L, 
    1L, 0L, 0L, 0L, 0L, 1L, 2L, 1L, 0L, 0L, 0L, 0L, 2L, 0L, 0L, 
    0L, 3L, 5L, 5L, 4L, 0L, 0L, 6L, 7L, 6L, 5L, 0L, 0L, 0L, 1L, 
    2L, 1L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 23L, 
    21L, 15L, 28L, 11L, 27L, 22L, 31L, 29L, 30L, 32L, 45L, 18L, 
    19L, 29L, 26L, 32L, 43L, 7L, 5L, 7L, 4L, 6L, 10L, 0L, 0L, 
    0L, 0L, 0L, 0L, 24L, 22L, 19L, 23L, 21L, 34L, 9L, 13L, 30L, 
    25L, 33L, 21L, 4L, 18L, 22L, 29L, 11L, 38L, 2L, 7L, 5L, 7L, 
    6L, 9L, 0L, 0L, 0L, 0L, 0L, 0L, 23L, 20L, 24L, 26L, 29L, 
    34L, 6L, 7L, 5L, 4L, 6L, 10L, 0L, 0L, 3L, 0L, 1L, 6L, 0L, 
    0L, 0L, 1L, 1L, 1L, 0L, 0L, 0L, 2L, 0L, 5L, 0L, 0L, 0L, 0L, 
    0L, 1L, 0L, 0L, 0L, 3L, 1L, 11L, 0L, 0L, 2L, 5L, 1L, 2L, 
    0L, 0L, 0L, 3L, 0L, 4L, 0L, 0L, 0L, 2L, 0L, 2L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 4L, 2L, 5L, 6L, 6L, 2L, 3L, 0L, 0L, 1L, 
    3L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 21L, 12L, 
    15L, 8L, 23L, 7L, 2L, 2L, 1L, 1L), CountDetections = c(0L, 
    0L, 7L, 5L, 3L, 7L, 0L, 0L, 5L, 8L, 8L, 4L, 0L, 0L, 1L, 4L, 
    1L, 1L, 0L, 0L, 0L, 1L, 3L, 3L, 0L, 0L, 1L, 0L, 2L, 4L, 0L, 
    0L, 4L, 5L, 5L, 5L, 0L, 0L, 6L, 7L, 7L, 5L, 0L, 0L, 0L, 1L, 
    2L, 2L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 2L, 23L, 
    21L, 18L, 28L, 11L, 27L, 23L, 31L, 29L, 30L, 34L, 45L, 19L, 
    19L, 29L, 26L, 32L, 43L, 7L, 5L, 7L, 4L, 6L, 10L, 0L, 0L, 
    0L, 0L, 0L, 0L, 24L, 22L, 19L, 23L, 21L, 34L, 10L, 15L, 30L, 
    25L, 34L, 24L, 4L, 19L, 23L, 29L, 13L, 38L, 2L, 7L, 5L, 7L, 
    7L, 9L, 0L, 0L, 0L, 0L, 0L, 0L, 23L, 20L, 24L, 26L, 29L, 
    34L, 6L, 7L, 5L, 4L, 6L, 10L, 0L, 0L, 4L, 1L, 1L, 7L, 0L, 
    0L, 0L, 3L, 2L, 1L, 0L, 0L, 0L, 3L, 0L, 5L, 0L, 0L, 2L, 2L, 
    0L, 1L, 0L, 0L, 0L, 5L, 1L, 11L, 0L, 0L, 3L, 5L, 1L, 2L, 
    0L, 0L, 2L, 3L, 0L, 6L, 0L, 0L, 0L, 3L, 0L, 3L, 0L, 0L, 1L, 
    0L, 0L, 1L, 0L, 0L, 6L, 2L, 5L, 6L, 7L, 4L, 5L, 1L, 0L, 3L, 
    3L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 23L, 12L, 
    16L, 10L, 23L, 10L, 2L, 2L, 1L, 1L), FalseDetections = c(0L, 
    0L, 1L, 0L, 2L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 
    0L, 1L, 0L, 0L, 0L, 0L, 1L, 2L, 0L, 0L, 1L, 0L, 0L, 4L, 0L, 
    0L, 1L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 
    0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 2L, 2L, 2L, 
    2L, 2L, 2L, 2L, 2L, 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, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 
    4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 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, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L
    ), .Label = c("03/06/13", "2/22/13", "2/26/13", "2/27/13", 
    "3/14/13"), class = "factor"), R.det = c(0, 0, 0.857142857, 
    1, 0.333333333, 1, 0, 0, 1, 1, 0.875, 0.75, 0, 0, 1, 1, 1, 
    0, 0, 0, 0, 1, 0.666666667, 0.333333333, 0, 0, 0, 0, 1, 0, 
    0, 0, 0.75, 1, 1, 0.8, 0, 0, 1, 1, 0.857142857, 1, 0, 0, 
    0, 1, 1, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0.833333333, 
    1, 1, 1, 0.956521739, 1, 1, 1, 0.941176471, 1, 0.947368421, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 
    1, 1, 1, 1, 0.9, 0.866666667, 1, 1, 0.970588235, 0.875, 1, 
    0.947368421, 0.956521739, 1, 0.846153846, 1, 1, 1, 1, 1, 
    0.857142857, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 0, 0, 0.75, 0, 1, 0.857142857, 0, 0, 0, 0.333333333, 
    0.5, 1, 0, 0, 0, 0.666666667, 0, 1, 0, 0, 0, 0, 0, 1, 0, 
    0, 0, 0.6, 1, 1, 0, 0, 0.666666667, 1, 1, 1, 0, 0, 0, 1, 
    0, 0.666666667, 0, 0, 0, 0.666666667, 0, 0.666666667, 0, 
    0, 0, 0, 0, 0, 0, 0, 0.666666667, 1, 1, 1, 0.857142857, 0.5, 
    0.6, 0, 0, 0.333333333, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    0, 0.913043478, 1, 0.9375, 0.8, 1, 0.7, 1, 1, 1, 1), c.receiver.depth = c(-0.2, 
    -0.2, -0.2, -0.2, -0.2, -0.2, -0.22, -0.22, -0.22, -0.22, 
    -0.22, -0.22, -0.22, -0.22, -0.22, -0.22, -0.22, -0.22, -0.225, 
    -0.225, -0.225, -0.225, -0.225, -0.225, -0.225, -0.225, -0.225, 
    -0.225, -0.225, -0.225, -0.205, -0.205, -0.205, -0.205, -0.205, 
    -0.205, -0.185, -0.185, -0.185, -0.185, -0.185, -0.185, -0.18, 
    -0.18, -0.18, -0.18, -0.18, -0.18, -0.165, -0.165, -0.165, 
    -0.165, -0.165, -0.165, -0.14, -0.14, -0.14, -0.14, -0.14, 
    -0.14, -0.34, -0.34, -0.34, -0.34, -0.34, -0.34, -0.365, 
    -0.365, -0.365, -0.365, -0.365, -0.365, -0.365, -0.365, -0.365, 
    -0.365, -0.365, -0.365, -0.38, -0.38, -0.38, -0.38, -0.38, 
    -0.38, -0.385, -0.385, -0.385, -0.385, -0.385, -0.385, -0.395, 
    -0.395, -0.395, -0.395, -0.395, -0.395, -0.4, -0.4, -0.4, 
    -0.4, -0.4, -0.4, -0.395, -0.395, -0.395, -0.395, -0.395, 
    -0.395, -0.38, -0.38, -0.38, -0.38, -0.38, -0.38, -0.37, 
    -0.37, -0.37, -0.37, -0.37, -0.37, -0.285, -0.285, -0.285, 
    -0.285, -0.285, -0.285, -0.31, -0.31, -0.31, -0.31, -0.31, 
    -0.31, 0.22, 0.22, 0.22, 0.22, 0.22, 0.22, 0.225, 0.225, 
    0.225, 0.225, 0.225, 0.225, 0.225, 0.225, 0.225, 0.225, 0.225, 
    0.225, 0.21, 0.21, 0.21, 0.21, 0.21, 0.21, 0.185, 0.185, 
    0.185, 0.185, 0.185, 0.185, 0.175, 0.175, 0.175, 0.175, 0.175, 
    0.175, 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 
    0.13, 0.13, 0.13, 0.105, 0.105, 0.105, 0.105, 0.105, 0.105, 
    0.215, 0.215, 0.215, 0.215, 0.215, 0.215, 0.54, 0.54, 0.54, 
    0.54, 0.54, 0.54, 0.525, 0.525, 0.525, 0.525, 0.525, 0.525, 
    0.515, 0.515, 0.515, 0.515, 0.515, 0.515, 0.545, 0.545, 0.545, 
    0.545, 0.545, 0.545, 0.525, 0.525, 0.525, 0.525), c.tm.depth = c(0.042807692, 
    0.042807692, 0.042807692, 0.042807692, 0.042807692, 0.042807692, 
    -0.282192308, -0.282192308, -0.282192308, -0.282192308, -0.282192308, 
    -0.282192308, -0.427192308, -0.427192308, -0.427192308, -0.427192308, 
    -0.427192308, -0.427192308, -0.027192308, -0.027192308, -0.027192308, 
    -0.027192308, -0.027192308, -0.027192308, 0.022807692, 0.022807692, 
    0.022807692, 0.022807692, 0.022807692, 0.022807692, 0.042807692, 
    0.042807692, 0.042807692, 0.042807692, 0.042807692, 0.042807692, 
    -0.267192308, -0.267192308, -0.267192308, -0.267192308, -0.267192308, 
    -0.267192308, -0.312192308, -0.312192308, -0.312192308, -0.312192308, 
    -0.312192308, -0.312192308, 0.062807692, 0.062807692, 0.062807692, 
    0.062807692, 0.062807692, 0.062807692, 0.127807692, 0.127807692, 
    0.127807692, 0.127807692, 0.127807692, 0.127807692, -0.592192308, 
    -0.592192308, -0.592192308, -0.592192308, -0.592192308, -0.592192308, 
    -0.612192308, -0.612192308, -0.612192308, -0.612192308, -0.612192308, 
    -0.612192308, -0.597192308, -0.597192308, -0.597192308, -0.597192308, 
    -0.597192308, -0.597192308, -0.607192308, -0.607192308, -0.607192308, 
    -0.607192308, -0.607192308, -0.607192308, -0.327192308, -0.327192308, 
    -0.327192308, -0.327192308, -0.327192308, -0.327192308, -0.572192308, 
    -0.572192308, -0.572192308, -0.572192308, -0.572192308, -0.572192308, 
    -0.622192308, -0.622192308, -0.622192308, -0.622192308, -0.622192308, 
    -0.622192308, -0.572192308, -0.572192308, -0.572192308, -0.572192308, 
    -0.572192308, -0.572192308, -0.577192308, -0.577192308, -0.577192308, 
    -0.577192308, -0.577192308, -0.577192308, -0.272192308, -0.272192308, 
    -0.272192308, -0.272192308, -0.272192308, -0.272192308, -0.547192308, 
    -0.547192308, -0.547192308, -0.547192308, -0.547192308, -0.547192308, 
    -0.607192308, -0.607192308, -0.607192308, -0.607192308, -0.607192308, 
    -0.607192308, 0.552807692, 0.552807692, 0.552807692, 0.552807692, 
    0.552807692, 0.552807692, 0.402807692, 0.402807692, 0.402807692, 
    0.402807692, 0.402807692, 0.402807692, 0.777807692, 0.777807692, 
    0.777807692, 0.777807692, 0.777807692, 0.777807692, 0.752807692, 
    0.752807692, 0.752807692, 0.752807692, 0.752807692, 0.752807692, 
    0.752807692, 0.752807692, 0.752807692, 0.752807692, 0.752807692, 
    0.752807692, 0.402807692, 0.402807692, 0.402807692, 0.402807692, 
    0.402807692, 0.402807692, 0.292807692, 0.292807692, 0.292807692, 
    0.292807692, 0.292807692, 0.292807692, 0.667807692, 0.667807692, 
    0.667807692, 0.667807692, 0.667807692, 0.667807692, 0.677807692, 
    0.677807692, 0.677807692, 0.677807692, 0.677807692, 0.677807692, 
    0.777807692, 0.777807692, 0.777807692, 0.777807692, 0.777807692, 
    0.777807692, 0.252807692, 0.252807692, 0.252807692, 0.252807692, 
    0.252807692, 0.252807692, 0.352807692, 0.352807692, 0.352807692, 
    0.352807692, 0.352807692, 0.352807692, 0.502807692, 0.502807692, 
    0.502807692, 0.502807692, 0.502807692, 0.502807692, 0.027807692, 
    0.027807692, 0.027807692, 0.027807692, 0.027807692, 0.027807692, 
    0.077807692, 0.077807692, 0.077807692, 0.077807692), c.temp = c(-4.095807692, 
    -4.095807692, -4.095807692, -4.095807692, -4.095807692, -4.095807692, 
    -4.220807692, -4.220807692, -4.220807692, -4.220807692, -4.220807692, 
    -4.220807692, -4.210807692, -4.210807692, -4.210807692, -4.210807692, 
    -4.210807692, -4.210807692, -4.175807692, -4.175807692, -4.175807692, 
    -4.175807692, -4.175807692, -4.175807692, -4.035807692, -4.035807692, 
    -4.035807692, -4.035807692, -4.035807692, -4.035807692, -3.920807692, 
    -3.920807692, -3.920807692, -3.920807692, -3.920807692, -3.920807692, 
    -3.820807692, -3.820807692, -3.820807692, -3.820807692, -3.820807692, 
    -3.820807692, -3.640807692, -3.640807692, -3.640807692, -3.640807692, 
    -3.640807692, -3.640807692, -3.660807692, -3.660807692, -3.660807692, 
    -3.660807692, -3.660807692, -3.660807692, -3.620807692, -3.620807692, 
    -3.620807692, -3.620807692, -3.620807692, -3.620807692, 0.074192308, 
    0.074192308, 0.074192308, 0.074192308, 0.074192308, 0.074192308, 
    -0.015807692, -0.015807692, -0.015807692, -0.015807692, -0.015807692, 
    -0.015807692, 0.324192308, 0.324192308, 0.324192308, 0.324192308, 
    0.324192308, 0.324192308, 0.544192308, 0.544192308, 0.544192308, 
    0.544192308, 0.544192308, 0.544192308, 0.759192308, 0.759192308, 
    0.759192308, 0.759192308, 0.759192308, 0.759192308, 1.324192308, 
    1.324192308, 1.324192308, 1.324192308, 1.324192308, 1.324192308, 
    1.549192308, 1.549192308, 1.549192308, 1.549192308, 1.549192308, 
    1.549192308, 1.709192308, 1.709192308, 1.709192308, 1.709192308, 
    1.709192308, 1.709192308, 1.639192308, 1.639192308, 1.639192308, 
    1.639192308, 1.639192308, 1.639192308, 1.579192308, 1.579192308, 
    1.579192308, 1.579192308, 1.579192308, 1.579192308, 2.724192308, 
    2.724192308, 2.724192308, 2.724192308, 2.724192308, 2.724192308, 
    2.839192308, 2.839192308, 2.839192308, 2.839192308, 2.839192308, 
    2.839192308, 1.064192308, 1.064192308, 1.064192308, 1.064192308, 
    1.064192308, 1.064192308, 1.184192308, 1.184192308, 1.184192308, 
    1.184192308, 1.184192308, 1.184192308, 1.254192308, 1.254192308, 
    1.254192308, 1.254192308, 1.254192308, 1.254192308, 1.379192308, 
    1.379192308, 1.379192308, 1.379192308, 1.379192308, 1.379192308, 
    1.529192308, 1.529192308, 1.529192308, 1.529192308, 1.529192308, 
    1.529192308, 1.599192308, 1.599192308, 1.599192308, 1.599192308, 
    1.599192308, 1.599192308, 1.669192308, 1.669192308, 1.669192308, 
    1.669192308, 1.669192308, 1.669192308, 1.664192308, 1.664192308, 
    1.664192308, 1.664192308, 1.664192308, 1.664192308, 1.714192308, 
    1.714192308, 1.714192308, 1.714192308, 1.714192308, 1.714192308, 
    0.984192308, 0.984192308, 0.984192308, 0.984192308, 0.984192308, 
    0.984192308, -1.545807692, -1.545807692, -1.545807692, -1.545807692, 
    -1.545807692, -1.545807692, -1.475807692, -1.475807692, -1.475807692, 
    -1.475807692, -1.475807692, -1.475807692, -1.460807692, -1.460807692, 
    -1.460807692, -1.460807692, -1.460807692, -1.460807692, -1.340807692, 
    -1.340807692, -1.340807692, -1.340807692, -1.340807692, -1.340807692, 
    -1.265807692, -1.265807692, -1.265807692, -1.265807692), 
    c.wind = c(1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, 1.27535159, 1.27535159, 1.27535159, 1.27535159, 
    1.27535159, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, -2.96855001, -2.96855001, -2.96855001, -2.96855001, 
    -2.96855001, 4.71144999, 4.71144999, 4.71144999, 4.71144999, 
    4.71144999, 4.71144999, 4.71144999, 4.71144999, 4.71144999, 
    4.71144999, 4.71144999, 4.71144999, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, -2.939182972, -2.939182972, 
    -2.939182972, -2.939182972, -2.939182972, 5.88092439, 5.88092439, 
    5.88092439, 5.88092439, 5.88092439, 5.88092439, 5.88092439, 
    5.88092439, 5.88092439, 5.88092439, 5.88092439, 5.88092439, 
    5.88092439, 5.88092439, 5.88092439, 5.88092439, 5.88092439, 
    5.88092439, 5.88092439, 5.88092439, 5.88092439, 5.88092439, 
    5.88092439, 5.88092439, 5.88092439, 5.88092439, 5.88092439, 
    5.88092439), c.distance = c(-160L, -160L, -160L, -160L, -160L, 
    -160L, -110L, -110L, -110L, -110L, -110L, -110L, -10L, -10L, 
    -10L, -10L, -10L, -10L, 90L, 90L, 90L, 90L, 90L, 90L, 190L, 
    190L, 190L, 190L, 190L, 190L, -160L, -160L, -160L, -160L, 
    -160L, -160L, -110L, -110L, -110L, -110L, -110L, -110L, -10L, 
    -10L, -10L, -10L, -10L, -10L, 90L, 90L, 90L, 90L, 90L, 90L, 
    190L, 190L, 190L, 190L, 190L, 190L, -160L, -160L, -160L, 
    -160L, -160L, -160L, -110L, -110L, -110L, -110L, -110L, -110L, 
    -10L, -10L, -10L, -10L, -10L, -10L, 90L, 90L, 90L, 90L, 90L, 
    90L, 190L, 190L, 190L, 190L, 190L, 190L, -160L, -160L, -160L, 
    -160L, -160L, -160L, -110L, -110L, -110L, -110L, -110L, -110L, 
    -10L, -10L, -10L, -10L, -10L, -10L, 90L, 90L, 90L, 90L, 90L, 
    90L, 190L, 190L, 190L, 190L, 190L, 190L, -160L, -160L, -160L, 
    -160L, -160L, -160L, -110L, -110L, -110L, -110L, -110L, -110L, 
    -110L, -110L, -110L, -110L, -110L, -110L, -10L, -10L, -10L, 
    -10L, -10L, -10L, 90L, 90L, 90L, 90L, 90L, 90L, 190L, 190L, 
    190L, 190L, 190L, 190L, -160L, -160L, -160L, -160L, -160L, 
    -160L, -110L, -110L, -110L, -110L, -110L, -110L, -10L, -10L, 
    -10L, -10L, -10L, -10L, 90L, 90L, 90L, 90L, 90L, 90L, 190L, 
    190L, 190L, 190L, 190L, 190L, -160L, -160L, -160L, -160L, 
    -160L, -160L, -10L, -10L, -10L, -10L, -10L, -10L, 90L, 90L, 
    90L, 90L, 90L, 90L, 190L, 190L, 190L, 190L, 190L, 190L, -160L, 
    -160L, -160L, -160L, -160L, -160L, -110L, -110L, -110L, -110L
    )), .Names = c("SUR.ID", "tm", "ValidDetections", "CountDetections", 
"FalseDetections", "replicate", "Area", "Day", "R.det", "c.receiver.depth", 
"c.tm.depth", "c.temp", "c.wind", "c.distance"), row.names = c(NA, 
-220L), class = "data.frame")

My script:

library(lme4)
df$SUR.ID <- factor(df$SUR.ID)
df$replicate <- factor(df$replicate)
Rdet <- cbind(df$ValidDetections,df$FalseDetections)
Unit <- factor(1:length(df$ValidDetections))
m1 <- glmer(Rdet ~ tm:Area + tm:c.distance + c.distance:Area + c.tm.depth:Area + c.receiver.depth:Area + c.temp:Area + c.wind:Area + c.tm.depth + c.receiver.depth + c.temp +c.wind + tm + c.distance + Area + replicate + (1|SUR.ID) + (1|Day) + (1|Unit) , data = df, family = binomial(link=logit))

(Unit = dispersion parameter used to calculate coefficients of determination)

In contrast to early 2013, the newest versions of R and lme4 return the following 3 warning messages:

1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 62.5817 (tol = 0.001)
2: In if (resHess$code != 0) { :
  the condition has length > 1 and only the first element will be used
3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model is nearly unidentifiable: very large eigenvalue
 - Rescale variables?;Model is nearly unidentifiable: large eigenvalue ratio
 - Rescale variables?

I searched google and stack overflow for potential solutions to the above warning messages, however I cannot make sense out of them, and how it may be applied to my specific model / data.

Subsequently, I'm trying to find the MAM by using the drop1() function in R using a Chi^2 test and remove non-significant variables 1 at a time. Ignoring the above warning messages, I execute the following command:

drop1(m1,test="Chi")

However, this command cannot be used (i.e., returns addition warning messages) if the above warnings are not solved / dealt with first.

Does anyone know what is happening here? Please, can someone help me how to solve these warnings? Ignoring is not an option.

Was it helpful?

Solution

tl;dr at least based on the subset of data you provided, this is a fairly unstable fit. The warnings about near unidentifiability go away if you scale the continuous predictors. Trying with a wide variety of optimizers, we get about the same log-likelihoods, and parameter estimates that vary by a few percent; two optimizers (nlminb from base R and BOBYQA from the nloptr package) converge without warnings, and are probably giving the "correct" answer. I haven't computed confidence intervals, but I suspect that they're very wide. (Your mileage may differ somewhat with your full data set ...)

source("SO_23478792_dat.R")  ## I put the data you provided in here

Basic fit (replicated from above):

library(lme4)
df$SUR.ID <- factor(df$SUR.ID)
df$replicate <- factor(df$replicate)
Rdet <- cbind(df$ValidDetections,df$FalseDetections)
Unit <- factor(1:length(df$ValidDetections))
m1 <- glmer(Rdet ~ tm:Area + tm:c.distance +
            c.distance:Area + c.tm.depth:Area +
            c.receiver.depth:Area + c.temp:Area +
            c.wind:Area +
            c.tm.depth + c.receiver.depth +
            c.temp +c.wind + tm + c.distance + Area +
            replicate +
            (1|SUR.ID) + (1|Day) + (1|Unit) ,
            data = df, family = binomial(link=logit))

I get more or less the same warnings you did, slightly fewer since the development version has been a little improved/tweaked:

## 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
##   Model failed to converge with max|grad| = 1.52673 (tol = 0.001, component 1)
## 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
##   Model is nearly unidentifiable: very large eigenvalue
##  - Rescale variables?;Model is nearly unidentifiable: large eigenvalue ratio
## - Rescale variables?

I tried various little things (restarting from the previous fitted values, switching optimizers) without much change in the results (i.e. the same warnings).

ss <- getME(m1,c("theta","fixef"))
m2 <- update(m1,start=ss,control=glmerControl(optCtrl=list(maxfun=2e4)))
m3 <- update(m1,start=ss,control=glmerControl(optimizer="bobyqa",
                         optCtrl=list(maxfun=2e4)))

Following the advice in the warning message (rescaling the continuous predictors):

numcols <- grep("^c\\.",names(df))
dfs <- df
dfs[,numcols] <- scale(dfs[,numcols])
m4 <- update(m1,data=dfs)

This gets rid of scaling warnings, but the warning about large gradients persists.

Use some utility code to fit the same model with many different optimizers:

afurl <- "https://raw.githubusercontent.com/lme4/lme4/master/misc/issues/allFit.R"
## http://tonybreyal.wordpress.com/2011/11/24/source_https-sourcing-an-r-script-from-github/
library(RCurl)
eval(parse(text=getURL(afurl)))
aa <- allFit(m4)
is.OK <- sapply(aa,is,"merMod")  ## nlopt NELDERMEAD failed, others succeeded
## extract just the successful ones
aa.OK <- aa[is.OK]

Pull out warnings:

lapply(aa.OK,function(x) x@optinfo$conv$lme4$messages)

(All but nlminb and nloptr BOBYQA give convergence warnings.)

Log-likelihoods are all approximately the same:

summary(sapply(aa.OK,logLik),digits=6)
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## -107.127 -107.114 -107.111 -107.114 -107.110 -107.110 

(again, nlminb and nloptr BOBYQA have the best fits/highest log-likelihoods)

Compare fixed effect parameters across optimizers:

aa.fixef <- t(sapply(aa.OK,fixef))
library(ggplot2)
library(reshape2)
library(plyr)
aa.fixef.m <- melt(aa.fixef)
models <- levels(aa.fixef.m$Var1)
(gplot1 <- ggplot(aa.fixef.m,aes(x=value,y=Var1,colour=Var1))+geom_point()+
    facet_wrap(~Var2,scale="free")+
    scale_y_discrete(breaks=models,
                     labels=abbreviate(models,6)))
## coefficients of variation of fixed-effect parameter estimates:
summary(unlist(daply(aa.fixef.m,"Var2",summarise,sd(value)/abs(mean(value)))))
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## 0.003573 0.013300 0.022730 0.019710 0.026200 0.035810 

Compare variance estimates (not as interesting: all optimizers except N-M give exactly zero variance for Day and SUR.ID)

aa.varcorr <- t(sapply(aa.OK,function(x) unlist(VarCorr(x))))
aa.varcorr.m <- melt(aa.varcorr)
gplot1 %+% aa.varcorr.m

I tried to run this with lme4.0 ("old lme4"), but got various "Downdated VtV" errors, even with the scaled data set. Perhaps that problem would go away with the full data set?

I haven't yet explored why drop1 doesn't work properly if the initial fit returns warnings ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top