您可以计算平均边际效应的对比,从而得到与您想要的结果相似的结果:当您改变一个变量时,成功概率的变化如何随着第二个变量的变化而变化。
这是Stata 中的一个可复制示例:
. webuse lbw, clear
(Hosmer & Lemeshow data)
. qui logit low i.smoke##i.race
. margins r.smoke#r.race
Contrasts of adjusted predictions
Model VCE : OIM
Expression : Pr(low), predict()
---------------------------------------------------------------------------
| df chi2 P>chi2
----------------------------------------+----------------------------------
smoke#race |
(smoker vs nonsmoker) (black vs white) | 1 0.00 0.9504
(smoker vs nonsmoker) (other vs white) | 1 1.59 0.2070
Joint | 2 1.67 0.4332
---------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
| Delta-method
| Contrast Std. Err. [95% Conf. Interval]
----------------------------------------+------------------------------------------------
smoke#race |
(smoker vs nonsmoker) (black vs white) | .0130245 .2092014 -.3970027 .4230517
(smoker vs nonsmoker) (other vs white) | -.2214452 .1754978 -.5654146 .1225242
-----------------------------------------------------------------------------------------
例如,与白人相比,吸烟对低体重孩子概率的影响要低 22 个百分点。这种差异并不显着。
这些结果与使用完全饱和的 OLS 模型得到的结果相同,您可以在其中直接解释交互系数:
. reg low i.smoke##i.race, robust
Linear regression Number of obs = 189
F(5, 183) = 5.09
Prob > F = 0.0002
R-squared = 0.0839
Root MSE = .45072
-------------------------------------------------------------------------------
| Robust
low | Coef. Std. Err. t P>|t| [95% Conf. Interval]
--------------+----------------------------------------------------------------
smoke |
smoker | .2744755 .0809029 3.39 0.001 .1148531 .4340979
|
race |
black | .2215909 .1257293 1.76 0.080 -.0264745 .4696563
other | .2727273 .0792791 3.44 0.001 .1163086 .4291459
|
smoke#race |
smoker#black | .0130245 .2126033 0.06 0.951 -.4064443 .4324933
smoker#other | -.2214452 .1783516 -1.24 0.216 -.5733351 .1304447
|
_cons | .0909091 .044044 2.06 0.040 .0040098 .1778083
-------------------------------------------------------------------------------