使用Stata的probit回归中交互变量的边际效应
Marginal effect of interaction variable in probit regression using Stata
我是 运行 概率回归,其中一个连续变量和一个虚拟变量之间存在交互作用。系数显示在回归输出中,但当我查看边际效应时,交互作用缺失。
如何得到交互变量的边际效应?
probit move_right c.real_income_change_percent##i.gender
Iteration 0: log likelihood = -345.57292
Iteration 1: log likelihood = -339.10962
Iteration 2: log likelihood = -339.10565
Iteration 3: log likelihood = -339.10565
Probit regression Number of obs = 958
LR chi2(3) = 12.93
Prob > chi2 = 0.0048
Log likelihood = -339.10565 Pseudo R2 = 0.0187
-----------------------------------------------------------------------------------------------------
move_right | Coef. Std. Err. z P>|z| [95% Conf. Interval]
------------------------------------+----------------------------------------------------------------
real_income_change_percent | .0034604 .0010125 3.42 0.001 .001476 .0054448
|
gender |
Female | .0695646 .1139538 0.61 0.542 -.1537807 .2929099
|
gender#c.real_income_change_percent |
Female | -.0039908 .0015254 -2.62 0.009 -.0069805 -.0010011
|
_cons | -1.263463 .0798439 -15.82 0.000 -1.419954 -1.106972
-----------------------------------------------------------------------------------------------------
margins, dydx(*) post
Average marginal effects Number of obs = 958
Model VCE : OIM
Expression : Pr(move_right), predict()
dy/dx w.r.t. : real_income_change_percent 1.gender
--------------------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
---------------------------+----------------------------------------------------------------
real_income_change_percent | .0002846 .0001454 1.96 0.050 -4.15e-07 .0005697
|
gender |
Female | -.0102626 .0207666 -0.49 0.621 -.0509643 .0304392
--------------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
这听起来像是一个特定于某个软件 (Stata) 的问题,因此票数接近,但这里潜伏着一个统计问题:交互效应的边际效应是什么样的?
此类边际效应并非微不足道,并且往往强烈依赖于其他协变量的值,请参见this article. Often this marginal effect is so variable that it makes no sense to try to summarize it with one number. In my opinion, this is a major weakness. To the extend that in general I tend to prefer using logistic regression and interpret the interaction term as a ratio of odds ratios, see this article。
我觉得你的问题很奇怪。您询问了虚拟交互,但您的示例涉及连续虚拟交互。
执行任一操作的方法如下:
webuse union, clear
/* dummy-dummy iteraction */
probit union i.south##i.black grade, nolog
margins r.south#r.black
/* continuous-dummy iteraction */
probit union i.south##c.grade
margins r.south, dydx(grade)
您应该尝试通过 "hand" 重现这些(使用 predict
s 的差异)以了解边距命令在幕后做了什么。
我是 运行 概率回归,其中一个连续变量和一个虚拟变量之间存在交互作用。系数显示在回归输出中,但当我查看边际效应时,交互作用缺失。
如何得到交互变量的边际效应?
probit move_right c.real_income_change_percent##i.gender
Iteration 0: log likelihood = -345.57292
Iteration 1: log likelihood = -339.10962
Iteration 2: log likelihood = -339.10565
Iteration 3: log likelihood = -339.10565
Probit regression Number of obs = 958
LR chi2(3) = 12.93
Prob > chi2 = 0.0048
Log likelihood = -339.10565 Pseudo R2 = 0.0187
-----------------------------------------------------------------------------------------------------
move_right | Coef. Std. Err. z P>|z| [95% Conf. Interval]
------------------------------------+----------------------------------------------------------------
real_income_change_percent | .0034604 .0010125 3.42 0.001 .001476 .0054448
|
gender |
Female | .0695646 .1139538 0.61 0.542 -.1537807 .2929099
|
gender#c.real_income_change_percent |
Female | -.0039908 .0015254 -2.62 0.009 -.0069805 -.0010011
|
_cons | -1.263463 .0798439 -15.82 0.000 -1.419954 -1.106972
-----------------------------------------------------------------------------------------------------
margins, dydx(*) post
Average marginal effects Number of obs = 958
Model VCE : OIM
Expression : Pr(move_right), predict()
dy/dx w.r.t. : real_income_change_percent 1.gender
--------------------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
---------------------------+----------------------------------------------------------------
real_income_change_percent | .0002846 .0001454 1.96 0.050 -4.15e-07 .0005697
|
gender |
Female | -.0102626 .0207666 -0.49 0.621 -.0509643 .0304392
--------------------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
这听起来像是一个特定于某个软件 (Stata) 的问题,因此票数接近,但这里潜伏着一个统计问题:交互效应的边际效应是什么样的?
此类边际效应并非微不足道,并且往往强烈依赖于其他协变量的值,请参见this article. Often this marginal effect is so variable that it makes no sense to try to summarize it with one number. In my opinion, this is a major weakness. To the extend that in general I tend to prefer using logistic regression and interpret the interaction term as a ratio of odds ratios, see this article。
我觉得你的问题很奇怪。您询问了虚拟交互,但您的示例涉及连续虚拟交互。
执行任一操作的方法如下:
webuse union, clear
/* dummy-dummy iteraction */
probit union i.south##i.black grade, nolog
margins r.south#r.black
/* continuous-dummy iteraction */
probit union i.south##c.grade
margins r.south, dydx(grade)
您应该尝试通过 "hand" 重现这些(使用 predict
s 的差异)以了解边距命令在幕后做了什么。