web-dev-qa-db-ja.com

rでglmerを実行しようとしたときの警告メッセージ

Stack Overflowコミュニティの皆様

現在、Rとlme4の古いバージョンはもうないので、Rとlme4の最新バージョンで(2013年の初めから)古いデータ分析の二項glmerモデルを再実行しようとしています。ただし、dmartinとcarineによる以前のスレッド(最初の警告メッセージ)やスタックオーバーフロー以外の他のスレッド(警告2および3)と同様の警告メッセージが発生します。これらの警告メッセージは、私が使用したRとlme4の以前のバージョンではポップアップ表示されなかったので、最新の更新と関係があるのでしょうか?

私のデータセットのサブセット:

    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, 3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L, 1L, 2L, 1L, 2L, 1L, 
    2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L
    ), .Label = c("CT", "PT-04"), 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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, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
    2L, 2L, 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, 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")

私のスクリプト:

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))

(単位=決定係数の計算に使用される分散パラメーター)

2013年の初めとは対照的に、Rとlme4の最新バージョンは、次の3つの警告メッセージを返します。

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?

上記の警告メッセージの潜在的な解決策を探すためにグーグルとスタックオーバーフローを検索しましたが、それらを理解できず、特定のモデル/データにどのように適用できるかわかりません。

続いて、Chi ^ 2テストを使用してRでdrop1()関数を使用し、重要でない変数を1つずつ削除して、MAMを見つけようとしています。上記の警告メッセージを無視して、次のコマンドを実行します。

drop1(m1,test="Chi")

ただし、上記の警告が最初に解決または処理されない場合、このコマンドは使用できません(つまり、追加の警告メッセージが返されます)。

ここで何が起こっているのか誰か知っていますか?これらの警告を解決する方法を誰かが手伝ってくれませんか?無視はオプションではありません。

本当にありがとう、

最高の願い、モーリッツ

13
FlyingDutch

tl; dr少なくとも提供したデータのサブセットに基づいて、これはかなり不安定な適合です。連続予測子をスケーリングすると、識別不能に近いという警告が消えます。さまざまなオプティマイザを試してみると、ほぼ同じ対数尤度が得られ、パラメータの推定値は数パーセント異なります。 2つのオプティマイザー(ベースRのnlminbnloptrパッケージのBOBYQA)は警告なしで収束し、おそらく「正しい」答えを出しています。信頼区間は計算していませんが、非常に広いと思います。 (あなたの走行距離はあなたの完全なデータセットで多少異なるかもしれません...)

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

基本的なフィット(上から複製):

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))

私はあなたがしたのと同じ警告を多かれ少なかれ受け取ります、開発バージョンが少し改善/調整されたので少し少なくなりました:

## 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?

結果に大きな変更を加えずに(つまり、同じ警告)、さまざまな小さなことを試みました(以前の近似値から始めて、オプティマイザの切り替え)。

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)))

警告メッセージのアドバイスに従う(連続予測子の再スケーリング):

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

これにより、スケーリングの警告は取り除かれますが、大きな勾配に関する警告が引き続き表示されます。

いくつかのユーティリティコードを使用して、同じモデルを多くの異なるオプティマイザに適合させます。

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]

警告を引き出す:

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

nlminbおよびnloptr BOBYQAを除くすべてが収束の警告を出します。)

対数尤度はすべてほぼ同じです。

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 

(ここでも、nlminbとnloptr BOBYQAが最もよく適合します/対数尤度が最も高くなります)

オプティマイザー間で固定効果パラメーターを比較します。

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 

分散推定値を比較します(それほど興味深いものではありません:N-Mを除くすべてのオプティマイザーは、DayとSUR.IDの分散を正確にゼロにします)。

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

これをlme4.0( "old lme4")で実行しようとしましたが、スケーリングされたデータセットでも、さまざまな「Downdated VtV」エラーが発生しました。おそらく、その問題は完全なデータセットで解消されますか?

最初の近似で警告が返された場合にdrop1が正しく機能しない理由についてはまだ調べていません...

17
Ben Bolker