我想比较100个不同城市(cityID)的发病率(asum),看看它们之间是否存在显着差异。鉴于发生率遵循泊松,因此它是对数线性模型。
m0=glm(asum~cityID, family=poisson, data=suit)
summary(m0)
然而,结果看起来如此笨拙和愚蠢。我做错了什么吗?或者,为了我的目的,有没有更好的方法来分析数据?
Call:
glm(formula = asum ~ cityID, family = poisson, data = suit)
Deviance Residuals:
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[25] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[49] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[73] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[97] 0 0 0 0
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.63759 0.16222 22.424 < 2e-16 ***
cityID2 1.68542 0.17662 9.543 < 2e-16 ***
cityID3 1.79614 0.17516 10.254 < 2e-16 ***
cityID4 2.17355 0.17120 12.696 < 2e-16 ***
cityID5 1.02585 0.18908 5.426 5.78e-08 ***
cityID6 2.20306 0.17095 12.887 < 2e-16 ***
:
:
:
cityID90 0.92676 0.19166 4.836 1.33e-06 ***
cityID91 1.28239 0.18334 6.994 2.66e-12 ***
cityID92 2.40267 0.16940 14.183 < 2e-16 ***
cityID93 1.39937 0.18113 7.726 1.11e-14 ***
cityID94 -1.23969 0.34238 -3.621 0.000294 ***
cityID95 0.59652 0.20201 2.953 0.003148 **
cityID96 -2.25129 0.52566 -4.283 1.85e-05 ***
cityID97 1.86367 0.17435 10.689 < 2e-16 ***
cityID98 1.82625 0.17479 10.448 < 2e-16 ***
cityID99 1.96453 0.17322 11.341 < 2e-16 ***
cityID100 0.93712 0.19138 4.897 9.74e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 1.0608e+04 on 99 degrees of freedom
Residual deviance: 2.8200e-14 on 0 degrees of freedom
AIC: 804.18
Number of Fisher Scoring iterations: 3