在测试连续变量和分类变量(超过 2 个类别)之间的交互时,我对 p 值的含义有疑问。
当我在使用 R 的 glm 模型中执行此操作时,我获得了每个类别变量与连续变量的 p 值。但是,我想使用 R 获得交互本身的 p 值,并了解这个 p 值的含义是什么。
代码和结果示例:
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 **
我想知道交互的 p 值及其含义(即,整个交互只有一个 p 值,而不是每个类别一个 p 值)