【发布时间】:2018-12-06 01:22:26
【问题描述】:
我对四个结果变量进行了多次回归(每年一次,超过 15 年)。
我创建了两个15x4 矩阵:一个带有系数,一个带有 t 统计量。我现在被困住了,我想以经典的方式将它们制成表格,每一行都有每个模型的系数,在它们下面是括号之间的相应 t 统计量。
我可以将单个矩阵制成表格,但即使使用estadd 我也无法获得上述结果。
这是我的代码:
*creates matrix of all results row(year) column(outcome)
matrix OLS_years = r_Mall, r_hotMall, r_totMall, r_irpMall
matrix list OLS_years
matrix TSTATS = ex_Tall, hot_Tall, tot_Tall, irp_Tall
matrix list TSTATS
使用 community-contributed 命令estout 只会生成一个包含系数的表格:
estout matrix(OLS_years), ///
cells(OLS_years TSTATS(par)) ///
stats(N, fmt(0) labels ("No. of Obs." )) ///
starlevels(* 0.1 ** 0.05 *** 0.001) ///
varwidth(20) ///
modelwidth(12) ///
delimiter(&) ///
end(\\) ///
prehead(`"\begin{tabular}{l*{4}{c}}"' `"\toprule"') ///
posthead("\midrule") ///
prefoot("\midrule") ///
postfoot(`"\bottomrule"' `"\multicolumn{@span}{l}{\footnotesize t-statistics in parentheses}\\"' `"\multicolumn{@span}{l}{\footnotesize *** p{$<$}0.01; ** p{$<$}0.05; * p{$<$}0.10.}\\"' `"\end{tabular}"') ///
varlabels(_cons Constant, end("" \addlinespace) nolast) ///
eqlabels(, begin("\midrule" "") nofirst) ///
substitute(_ \_ "\_cons " \_cons) ///
interaction(" $\times$ ") ///
notype ///
level(95) ///
style(esttab)
谁能帮忙?
【问题讨论】: