Stata边际效应输出
2019-12-13 本文已影响0人
哈桑_73bc
- 关于OLS回归结果的输出,Stata:毕业论文大礼包 A——实证结果输出命令大比拼已经有非常详细的讲解。本文主要简单介绍如何将边际效应输出至Word,适用于Logit、Probit等模型。
与OLS不同,Logit模型的系数并非解释变量对被解释变量的边际效应,因此往往需用
margins,dydx(*)
命令求平均边际效应。下面来看两个简单的例子。
1.单个回归结果输出
sysuse auto, clear
logit foreign mpg rep78 head
margins, dydx(_all) post
outreg2 using myfile, replace ctitle(margins1) word dec(3)

2.多个回归结果输出
sysuse auto, clear
logit foreign mpg
margins, dydx(_all) post
est store M1
logit foreign mpg rep78
margins, dydx(_all) post
est store M2
outreg2 [M1 M2] using myfile, replace see word dec(3)

3.小结
总的来说,Logit、Probit等模型的边际效应输出与常见的OLS回归结果输出并无大的差异,仅需在求边际效应命令后加上
post
选择项即可,即margins,dydx(_all) post
。