【问题标题】:Why are the standard errors of these emmeans contrasts 100x lower than those of the emmeans themselves?为什么这些 emmeans 对比度的标准误差比 emmeans 本身的低 100 倍?
【发布时间】:2021-05-27 03:21:34
【问题描述】:

我从 glm 模型中得到了我无法理解的结果。在这个模型中,Bond 是一个具有三个水平的因子。三个水平的emmeans 具有较大的标准误差和较宽的置信区间。从这个角度来看,级别之间似乎没有任何显着区别。

但是,当我查看一些成对比较时,标准误差要小 100 倍,并且两个比较(A10 - A15 和 A14 - A15)实际上在 95% 的置信水平上显着。数据或模型是否有任何属性可以解释这一点?

抱歉,我缺乏统计知识并且无法生成可重现的示例,因为数据集有超过 1,000 行。非常感谢。

> emmeans(Model1, "Bond")

 Bonder emmean   SE  df asymp.LCL asymp.UCL
 A10     -6.75 21.6 Inf     -49.1      35.6
 A14     -6.48 21.6 Inf     -48.8      35.9
 A15     -6.12 21.6 Inf     -48.5      36.2

Results are averaged over the levels of: Spin, Type 
Results are given on the logit (not the response) scale. 
Confidence level used: 0.95 

> pairs(emmeans(Model1, "Bond"))

 contrast  estimate     SE  df z.ratio p.value
 A10 - A14   -0.271 0.2579 Inf -1.049  0.5456 
 A10 - A15   -0.636 0.2591 Inf -2.453  0.0376 
 A14 - A15   -0.365 0.0674 Inf -5.416  <.0001 

Results are averaged over the levels of: Spin, Type 
Results are given on the log odds ratio (not the response) scale. 
P value adjustment: tukey method for comparing a family of 3 estimates ```

【问题讨论】:

    标签: r glm emmeans


    【解决方案1】:

    很难确定,但最明显的原因是估计值之间存在很强的正相关性。一般来说,(A-B) 的方差是Var(A)+Var(B)-2*Cov(A,B),所以(例如)如果ABC 的方差(因此标准误差)为 1,相关性(== 协方差在这种情况下)所有对之间为 0.8;那么任何成对差异的方差为1+1-2*0.8=0.4,因此标准差为 0.63。但是,将标准误差降低两个数量级需要非常强相关性。

    一个相关的可能性是这是一个完全分离的情况(这会导致较大的系数甚至更大的标准误差,尽管我通常希望这些会更大(例如|beta|&gt;8 , SD>5*beta)

    cov2cor(vcov(Model)) 是什么?

    【讨论】:

    • 我同意。此外,请注意,这是在 logit 尺度上,并且 EMM 对应于极低的预测概率——在 0.001 范围内。要更直接地了解所涉及的协方差,请执行EMM = emmeans(Model1, "Bond"); vcov(EMM); cov2cor(vcov(EMM))
    • 感谢 Ben 和 Russ 提供的有用建议。当我查看该计算的结果,然后查看其他变量的一些 emmeans 时,我发现了方差膨胀的证据。我过滤了数据以排除两个级别的 Type 变量,它们的行数很少且膨胀为零,这导致了更易于理解的结果。
    • 这就解释了!
    猜你喜欢
    • 2020-05-05
    • 2021-12-02
    • 2018-10-05
    • 2020-06-09
    • 2021-07-23
    • 2021-08-18
    • 2021-11-20
    • 2021-07-10
    • 2022-11-22
    相关资源
    最近更新 更多