原文链接:https://www.lianxh.cn/news/3e47d865073a6.html
目录
- 1. 边际效应简介
- 2. 计算边际效应命令 (margins) 与绘图命令 (marginsplot)
- 3. margins 与 marginsplot 命令举例
- 4. marginscontplot 命令及举例
- 5. 相关阅读资料
1. 边际效应简介
1.1 引言
考研复试结束后,你和闺蜜决定去成都旅游。当你和闺蜜正在品尝当地最有名气的麻辣火锅时,你们感觉心情非常愉快。此时,麻辣火锅将有助于有一个好心情,它对心情的边际效应是正值;当你们吃到一半时,手机上收到了一条消息,是考研复试的排名结果,打开消息后,发现你们俩都榜上有名。你们看到被录取的消息后万分高兴,吃的更 high 了,又多点了一些菜,并决定吃完后再去 KTV 庆祝下。此时,考研成功的结果极大的增加了吃火锅对心情的边际效应值。
研究生入学后,你和闺蜜都十分努力学习,认真的完成导师布置的课题任务并将课题研究内容整理成小论文投到了一个 C 刊上,但遭到拒稿。此时,努力学习对科研成果的边际效应是负值。不过你们没有就此停止努力,继续请教导师、按照意见认真修改并写成英文投到了一个 SSCI 期刊上,结果被录用了。此时,随着努力程度的增加,它对科研成果的边际效应变为正值。
总结上面的例子,我们发现,吃麻辣火锅(x1)对心情(y)的边际效应受到其他变量(x2:考研成功)的调节作用,使得该边际效应值增加了。一开始,努力学习(x3)对科研成果的边际效应为负,但随着努力程度的增加(x3 值的增加),它对科研成果的边际效应变为正值。
5. 相关阅读资料
- Marginal means, adjusted predictions, and marginal effects
- The Stata Blog » margins
- The Stata Blog » marginal effects
- Margins plots
- Trouble at the margins
- In the spotlight: Estimating, graphing, and interpreting interactions using margins
- In the spotlight: Visualizing continuous-by-continuous interactions with margins and twoway contour
- Effects of nonlinear models with interactions of discrete and continuous variables: Estimating, graphing, and interpreting
- Ben Jann, 2013, PPT, Predictive Margins and Marginal Effects in Stata