打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
一文读懂esttab,论文表格输出你pick哪一个?

来源:Stata Manual: [R] estimates、The Stata Journal《Making regression tables simplified》,作者:Ben Jann

由计量经济学服务中心综合整理,转载请注明来源


新的esttab命令是estout的升级版本。它的语法相比较于estout而言,默认情况下,它会生成很好地结果,并输出在Stata的结果窗口中。 


esttab不仅仅是estout的简化版本。另一方面,esttab提供完整的estout功能,因为所有的estout选项都是允许在esttab中。 另一方面,esttab也扩展了功能。例如,esttab支持与WORD、Excel、Latex、Html结果。



一、Basic syntax and usage



Syntax

esttab [namelist] [using filename] [, options]


与estout(或官方Stata的估计表)一样,基本程序是首先存储多个模型,然后将esttab应用于这些存储的估计集以组成回归表。 但是,esttab和estout之间的主要区别在于,如果在没有选项的情况下应用,esttab会生成一个完全格式化的表。 



二、添加统计量


The default in esttab is to display raw point estimates along with t statistics and to print the number of observations in the table footer. Furthermore, the output displays asterisks denoting the statistical significance of coefficients. All this can be changed. To replace the t statistics with standard errors, add the adjusted R-squared, and omit the significance asterisks; for example, type


esttab, se ar2 nostar


结果为:



t统计量也可以用p值(p),置信区间(ci)或 估计中包含的任何参数统计信息(请参阅aux()选项)。更多信息请参考esttab的option选项。


esttab, beta not




三、添加数据来源以及表头等信息


Furthermore, the plain option produces a minimally formatted table with all display formats set to Stata’s %9.0g quasistandard, and compress reduces horizontal spacing to fit more models on screen without line breaking. Other options are, for example, label, which causes variable labels to be used, and mtitles(), which specifies that model titles be printed in the header above the model columns. For example,


esttab, se ar2 nostar brackets label title(This is a regression table) > nonumbers mtitles('Model A' 'Model B') addnote('Source: auto.dta')




四、数据结果小数点位数保存格式


esttab, b(%9.0g) p(4) r2(4) nostar wide



五、结果输出


use 'E:\stata\data\盈余管理新版.dta', clear

reg dacc rid tm

est store da

reg dacc rid tm size

est store qin

reg dacc rid tm size debt14 eps

est store daqinxueshu

esttab da qin daqinxueshu using daqinxueshu14.rtf, ///

 mtitles('model 1' 'model 2' 'model 3' ) ///

title('This is the Second regression table') ///

append star( * 0.10 ** 0.05 *** 0.01 ) staraux r2 nogaps 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Stata FAQ: How can I use
Stata:输出漂亮的LaTeX表格
STATA結果以Excel、WORD 以及LaTex編譯格式輸出
Stata输出统计结果到Excel或word
没有这5个Stata命令, 我真的会活不下去!
互助问答第549期:reghdfe回归命令问题
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服