1 Star 0 Fork 11

dingxiuhao/Stata-Event_Study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Table 02.do 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
Richard Herron 提交于 2017-07-25 08:12 . Added simple tables
/* correlation matrix */
/* {{{ Comments
}}} */
/* {{{ calculations */
/* generate column labels */
local first : word 1 of $CORRS
local blist "`first'" "(1) "
local wc : word count $CORRS
display "`wc'"
local labs "(1)"
forvalues i = 2/`wc' {
local labs "`labs'" "(`i')"
local next : word `i' of $CORRS
local blist "`blist'" "`next'" "(`i') "
}
display "`labs'"
display "`blist'"
/* determine correlations */
eststo clear
estpost correlate $CORRS, matrix
eststo
/* }}} */
/* {{{ tables */
/* macros for tables */
local screen ///
wrap ///
cells(b(fmt(%9.2f))) ///
stats(N, fmt(%12.3gc) labels("Observations")) ///
unstack not nostar compress ///
label nonumbers nomtitles ///
varlabels(, blist("`blist'")) ///
eqlabels("`labs'") ///
collabels(none)
local latex replace booktabs width(\hsize)
esttab , `screen'
esttab using "Table_02.tex", `screen' `latex'
/* }}} */
/* /1* {{{ alternate table *1/ */
/* /1* include two variables only *1/ */
/* eststo clear */
/* estpost correlate $CORRS */
/* eststo */
/* local varscorr : subinstr global CORRS "$VARONE" "" */
/* estpost correlate `varscorr' */
/* eststo */
/* /1* macros for tables *1/ */
/* local screen /// */
/* wrap /// */
/* cells(rho(fmt(%9.2f))) /// */
/* stats(N, fmt(%12.3gc) labels("Observations")) /// */
/* unstack not nostar /// */
/* label nonumbers nomtitles */
/* local latex replace booktabs width(\hsize) */
/* esttab, `screen' */
/* esttab using "Table_02_alt.tex", `screen' `latex' */
/* /1* }}} *1/ */
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dingxiuhao/Stata-Event_Study.git
git@gitee.com:dingxiuhao/Stata-Event_Study.git
dingxiuhao
Stata-Event_Study
Stata-Event_Study
master

搜索帮助