stata - 你如何在 Stata 中使用 margins 命令存储边际效应?

标签 stata effects

我正在 Stata 中估算一个常规的 probit 模型,并使用 margins 命令来计算边际效应。

我试图说明在我的估计中将虚拟变量视为连续而不是将它们视为从 0 到 1 的离散变化时的影响变化。

probit dead dmage dmeduc i.dmar i.foreignb i.mblack i.mhispan i.motherr agesq i.tobacco i.alcohol
margins, dydx(alcohol tobacco) // treating the discrete variables 
margins, dydx(alcohol tobacco) continuous

根据文档,margins 命令使用 e() 存储估计值。但是,当我在使用 margins 命令后尝试保存估计值时,无论我是否使用

return list 
ereturn list

它只是从我的 probit 模型而不是 margins 命令返回保存的后估计结果。

如何存储边际效应值,然后将它们放入表格中以显示比较?

最佳答案

margins 的文档说,如果您指定 post 选项,结果将在 e() 中返回。所以这里是一个做你想做的事的例子:

sysuse auto, clear
gen byte good = rep78 > 3 if !missing(rep78)

probit good i.foreign price
margin , dydx(foreign) post
est store indicator

probit good foreign price
margins , dydx(foreign) post
est store continuous

est table indicator continuous, se

关于stata - 你如何在 Stata 中使用 margins 命令存储边际效应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28043371/

相关文章:

excel - 如何使用 outreg2 或 esttab 将多组回归导出到一个 Excel 工作簿中?

audio - DSP - 滤波器扫描效果

r - 固定效应,工具变量回归,如 stata 中的 xtivreg(FE IV 回归)

remote-server - 是否有突出显示 Stata 语法的命令行编辑器?

stata - 使不平衡的面板与缺失的观察结果保持平衡

stata - .ado 程序中可选字符串选项的默认值

javascript - 这种模糊效果是如何在 javascript 中完成的?

algorithm - 我可以实现什么样的酷图形算法?

javascript - 为什么可以链接 jquery 效果,而不是使用回调

c# - 如何在 C# 中向我的控件添加 move 效果?