You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GLM泊松模型交互项系数为NA的原因排查求助

关于Poisson回归交互项出现奇异值的问题

我运行了以下Poisson回归模型:

model <- glm(DV ~ IV1*IV2, data = data, family="poisson")

得到的模型输出结果如下:

Call:
glm(formula = DV ~ IV1 * IV2, family = "poisson", 
    data = data)

Coefficients: (1 not defined because of singularities)
                   Estimate Std. Error z value Pr(>|z|)
(Intercept)        0.465506   0.053783   8.655   <2e-16
IV1            -0.005388   0.048897  -0.110    0.912
IV2         0.540514   0.032046  16.867   <2e-16
IV1:IV2        NA         NA      NA       NA
                     
(Intercept)       ***
IV1               
IV2        ***
IV1:IV2    
---
Signif. codes:  
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 3029.4  on 2153  degrees of freedom
Residual deviance: 2705.6  on 2151  degrees of freedom
  (364 observations deleted due to missingness)
AIC: 7393.5

Number of Fisher Scoring iterations: 5

我原本怀疑IV1和IV2存在完全共线性,于是运行了交叉表命令:

table(data$IV1, data$IV2, useNA = "always")

输出结果显示四个单元格都有非零计数,不存在完全共线性:

0    1 <NA>
  0     331  198    0
  1    1278  711    0
  <NA>    0    0    0

但模型里的交互项IV1:IV2仍显示为NA(因奇异值无法估计)。我无法提供完整数据框,想请教可能的原因是什么?还有哪些需要检查的内容?

补充:我用with()命令生成了包含DV的三维交叉表,结果如下:

with(survey_clean, table(IV1, IV2, DV, useNA = "always"))
, , DV = 0

     IV2
IV1   0   1
    0   0  15
    1 398  47

, , DV = 1

     IV2
IV1   0   1
    0   0  12
    1 266  85

, , DV = 2

     IV2
IV1   0   1
    0   0  50
    1 259 145

, , DV = 3

     IV2
IV1   0   1
    0   0  52
    1 131 163

, , DV = 4

     IV2
IV1   0   1
    0   0  67
    1 204 260

, , DV = NA

      IV2
IV1    0   1 <NA>
  0    331   2    0
  1     20  11    0
  <NA>   0   0    0

内容的提问来源于stack exchange,提问作者hy9fesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 13:27:37