首页 > 解决方案 > 如何获得stata中每条交互线的系数?

问题描述

在此处输入图像描述

当我使用“边距图”时,我得到了上图。

如何获得每条橙色、绿色、红色、蓝色线的系数?

我使用了下面的代码。我从 margins 命令报告中得到了结果。但是,他们会报告 iv 和 moderator 都固定在特定点的结果。我想知道的是 iv 的系数,例如,当 mo1 固定为 1(最低值)

xtreg y c.iv##c.mo1 c.iv##c.mo2, fe  # both interactions are significant. 

margins, at(mo1 = (1(1)4) iv = (1(1)4) mo2 = 0)

marginsplot

标签: statainteraction

解决方案


推荐阅读