我如何解释泊松回归中的主要影响(虚拟编码因子的系数)?
假设以下示例:
treatment <- factor(rep(c(1, 2), c(43, 41)),
levels = c(1, 2),
labels = c("placebo", "treated"))
improved <- factor(rep(c(1, 2, 3, 1, 2, 3), c(29, 7, 7, 13, 7, 21)),
levels = c(1, 2, 3),
labels = c("none", "some", "marked"))
numberofdrugs <- rpois(84, 10) + 1
healthvalue <- rpois(84, 5)
y <- data.frame(healthvalue, numberofdrugs, treatment, improved)
test <- glm(healthvalue~numberofdrugs+treatment+improved, y, family=poisson)
summary(test)
输出为:
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.88955 0.19243 9.819 <2e-16 ***
numberofdrugs -0.02303 0.01624 -1.418 0.156
treatmenttreated -0.01271 0.10861 -0.117 0.907 MAIN EFFECT
improvedsome -0.13541 0.14674 -0.923 0.356 MAIN EFFECT
improvedmarke -0.10839 0.12212 -0.888 0.375 MAIN EFFECT
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
我知道的发生率numberofdrugs
是exp(-0.023)=0.977
。但是,如何解释虚拟变量的主要影响?