且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在lme4 glmer中缩放预测变量不能解决特征值警告;它不能解决特征值警告.替代优化也没有

更新时间:2023-12-04 15:07:23

tl; dr 在烧伤"状态下,您根本没有任何积极结果.您不必不必担心这一点-AIC比较仍然应该相当健壮-但是您可能想在继续之前了解正在发生的事情.在GLMM常见问题解答( CrossValidated 上有各种各样的相关问题/答案).

tl;dr This looks like a case of complete separation; you have no positive outcomes at all in your "burned" condition. You don't necessarily need to worry about this - the AIC comparisons should still be reasonably robust - but you might want to understand what's going on before you proceed. This problem (and remedies) are discussed in a relevant section of the GLMM FAQ (and there are a variety of relevant questions/answers on CrossValidated).

我怎么知道?这是系数:

How do I know? Here are the coefficients:

  (Intercept)       s.can_perc               s.can_n                s.time                s.temp  
   -19.29632          -0.22153               0.45840               0.05241              -0.24990  
       s.cloud_cover  factor(burnt)unburnt         s.time:s.temp  
            -0.19692              19.02091              -0.13949  

任何时候,(二项式或泊松)GLM中的系数(绝对值)都大于8-10时,就不得不担心(除非您查看的是数值协变量的系数,该系数的测量值非常大)单位,例如,如果您要查看后院中的碳含量(以千兆吨为单位).这意味着预测变量的单位变化会导致对数赔率(例如,二项式/对数链接模型)的对数赔率发生(例如)10个单位的变化.从0.006( plogis(-5))到0.994( plogis(5))的概率.在您的情况下,截距为-19.29,因此在处于燃烧状态的所有预测变量的值为零时,您获得的概率为4.2e-9.另一个巨大的系数是 unburnt (19.02),因此在未燃烧(unburnt?)条件下所有预测变量的值为零时,您会得到 plogis(-19.29 + 19.02) = 0.43.

Any time you have coefficients in a (binomial or Poisson) GLM that are larger (in absolute value) than 8-10, you have to worry (unless you are looking at the coefficient of a numerical covariate that's measured in very large units, e.g. if you're looking at the amount of carbon in your backyard in units of gigatonnes). This means a one-unit change in the predictor variable causes a (say) 10-unit change in the log-odds (for a binomial/logit-link model), e.g. from a probability of 0.006 (plogis(-5)) to 0.994 (plogis(5)). In your case, the intercept is -19.29, so at zero values of all of the predictors in the burned condition you get a probability of 4.2e-9. The other huge coefficient is for unburnt (19.02), so at zero values of all of the predictors in the unburned (unburnt?) condition you get plogis(-19.29+19.02) = 0.43.