我对连续变量和分类变量之间的相互作用系数的解释有疑问。这是我的模型:
model_glm3=glm(cog~lg_hag+race+pdg+sex+as.factor(educa)+(lg_hag:as.factor(educa)),
data=base_708)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 21.4836 2.0698 10.380 < 2e-16 ***
lg_hag 8.5691 3.7688 2.274 0.02334 *
raceblack -8.4715 1.7482 -4.846 1.61e-06 ***
racemexican -3.0483 1.7073 -1.785 0.07469 .
racemulti/other -4.6002 2.3098 -1.992 0.04687 *
pdg 2.8038 0.4268 6.570 1.10e-10 ***
sexfemale 4.5691 1.1203 4.078 5.15e-05 ***
as.factor(educa)2 13.8266 2.6362 5.245 2.17e-07 ***
as.factor(educa)3 21.7913 2.4424 8.922 < 2e-16 ***
as.factor(educa)4 19.0179 2.5219 7.541 1.74e-13 ***
as.factor(educa)5 23.7470 2.7406 8.665 < 2e-16 ***
lg_hag:as.factor(educa)2 -21.2224 6.5904 -3.220 0.00135 **
lg_hag:as.factor(educa)3 -19.8083 6.1255 -3.234 0.00129 **
lg_hag:as.factor(educa)4 -8.5502 6.6018 -1.295 0.19577
lg_hag:as.factor(educa)5 -17.2230 6.3711 -2.703 0.00706 ***
可以说模型的方程为:
E [cog] = a + b1(lg_hag)+ b2(educa2 * lg_hag)+ b3(educa3 * lg_hag)+ b4(educa4 * lg_hag)+ b5(pdg,居中)+其他变量
b1 = difference in cog with higher lg_hag among lowest education (coded as 1)
b1 + b2 = difference in cog with higher lg_hag among middle education (coded as 2)
b1 + b3 = difference in cog with higher lg_hag among high education (coded as 3)
b1 + b3 = difference in cog with higher lg_hag among very high education (coded as 4)
b5 = difference in cog with each unit increase in pdg
我的问题是:如果我的解释正确,那么如何根据b1和b2的置信区间来构造每个交互作用效果估计的置信区间(例如:b1 + b2)。