 注册    登录 创作新主题

Python
 python开源   Django   Python   DjangoApp   pycharm
DATA
 docker   Elasticsearch

 问与答   闲聊   招聘   翻译   创业   分享发现   分享创造   求职   区块链   支付之战
aigc
 aigc   chatgpt
WEB开发
 linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery

Python88.com
 反馈   公告   社区推广

Python社区  »  Git

# logit和probit模型中的交叉项, 如何求边际效应  7.U型和倒U型关系及其调节效应, 把非线性关系推进一点 *Logit模型下交互项的边际效应

logit \$y age educ ageeduc male ins_pub ins_uni \$x, nolog cluster(pid)
inteff \$y age educ ageeduc male ins_pub ins_uni \$x,
savedata(d:\data\logit_inteff,replace)
savegraph1(d:\data\figure1, replace)
savegraph2(d:\data\figure2, replace)

*Probit模型下交互项的边际效应

probit \$y male ins_uni male_uni age educ ins_pub \$x, nolog cluster(pid)
inteff \$y male ins_uni male_uni age educ ins_pub \$x,
savedata(d:\data\probit_inteff, replace)
savegraph1(d:\data\figure3, replace)
savegraph2(d:\data\figure4, replace)  Applied researchers often estimate interaction terms to infer how the effect of one independent variable on the dependent variable depends on the magnitude of another independent variable. For example, is the effect of car weight on gas mileage the same for both domestic and foreign cars? To answer this question, we can run a regression to predict gas mileage as a function of weight, a dummy variable for foreign, and the interaction between the two. If the coefficient on the interaction term is statistically significant, there is a difference between domestic and foreign cars in how additional weight affects mileage.

Interaction terms are also used extensively in nonlinear models, such as logit and probit models. Unfortunately, the intuition from linear regression models does not extend to nonlinear models. The marginal effect of a change in both interacted variables is not equal to the marginal effect of changing just the interaction term. More surprisingly, the sign may be different for different observations. The statistical significance cannot be determined from the z-statistic reported in the regression output. The odds-ratio interpretation of logit coefficients cannot be used for interaction terms.

Despite the common use of interaction terms, most applied researchers misinterpret the coefficient of the interaction term in nonlinear models. A review of 13 economics journals listed on JSTOR (www.jstor.org) found 72 articles published between 1980 and  2000 that used interaction terms in nonlinear models (Ai and Norton 2003). None of the studies interpreted the coefficient on the interaction term correctly. A recent article by DeLeire (2000) is a welcome exception.

The Stata command inteff computes the correct marginal effect of a change in two interacted variables for a logit or probit model. It also computes the correct standard errors. The inteff command will work if the interacted variables are both continuous variables, if both are dummy variables, or if there is one of each. In addition, it will graph the interaction effect and save the results to allow further investigation. 2年，计量经济圈公众号近1000篇文章，

Econometrics Circle  Python社区是高质量的Python/Django开发社区