【问题标题】:Using glmer for logistic regression, how to verify response reference使用 glmer 进行逻辑回归,如何验证响应参考
【发布时间】:2014-06-20 19:22:23
【问题描述】:

我的问题很简单,但我无法在 R 手册或在线搜索中找到明确的答案。使用 glmer 进行逻辑回归时,是否有一种好方法可以验证您对响应变量的参考是什么?

我得到的结果始终与理论完全相反,我认为我的响应变量必须与我的意图相反,但我无法验证。

我的响应变量用 0 和 1 编码。

谢谢!

【问题讨论】:

    标签: r logistic-regression lme4


    【解决方案1】:

    您可以模拟一些您知道真实效果的数据...?simulate.merMod 使这相对容易。无论如何,

    • 这些影响是根据它们对 1 响应的对数赔率的影响来解释的
    • 例如,0.5 的斜率意味着预测变量增加 1 个单位会使观察到 1 而不是 0 的对数几率增加 0.5。
    • 对于此类问题,glmerglm 继承其框架。特别是,?family 指出:

    对于“二项式”和“准二项式”族,响应可以 可以通过以下三种方式之一指定:

       1. As a factor: ‘success’ is interpreted as the factor not
          having the first level (and hence usually of having the
          second level).
    
       2. As a numerical vector with values between ‘0’ and ‘1’,
          interpreted as the proportion of successful cases (with the
          total number of cases given by the ‘weights’).
    
       3. As a two-column integer matrix: the first column gives the
          number of successes and the second the number of failures.
    

    您的数据是#2 的(常见)特例(每种情况的“成功比例”为零或 100%,因为每次观察只有一个案例;权重向量是全为的向量默认)。

    【讨论】:

      猜你喜欢
      • 2018-11-11
      • 2015-12-19
      • 2015-02-21
      • 2018-08-11
      • 1970-01-01
      • 2017-01-02
      • 1970-01-01
      • 2020-09-27
      • 2017-09-25
      相关资源
      最近更新 更多