Latex 从estout中的列名中删除斜杠

Latex 从estout中的列名中删除斜杠,latex,stata,Latex,Stata,我使用社区贡献的命令estout在Stata中创建一个摘要统计表 我的代码在每个平均估计值下方的括号中显示标准偏差: sysuse auto, clear eststo clear estpost summarize price mpg weight esttab, cells(mean sd(par)) ------------------------- (1) mean/sd ---------------

我使用社区贡献的命令
estout
在Stata中创建一个摘要统计表

我的代码在每个平均估计值下方的括号中显示标准偏差:

sysuse auto, clear

eststo clear
estpost summarize price mpg weight
esttab, cells(mean sd(par))

-------------------------
                      (1)

                  mean/sd
-------------------------
price            6165.257
               (2949.496)
mpg               21.2973
               (5.785503)
weight           3019.459
               (777.1936)
-------------------------
N                      74
-------------------------
如何消除斜杠(
/
),同时强制将
平均值
sd
显示在彼此的顶部


我还想将结果导出到
LaTeX

中。您可以使用以下选项来生成所需的结果:

esttab, cells(mean sd(par)) mtitle("mean") collabels("sd") nonumbers

-------------------------
                     mean
                       sd
-------------------------
price            6165.257
               (2949.496)
mpg               21.2973
               (5.785503)
weight           3019.459
               (777.1936)
-------------------------
N                      74
-------------------------
对于
LaTeX
输出,您还需要
tex
选项:

esttab, cells(mean sd(par)) mtitle("mean") collabels("sd") nonumbers tex

{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{tabular}{l*{1}{c}}
\hline\hline
            &\multicolumn{1}{c}{mean}\\
            &          sd\\
\hline
price       &    6165.257\\
            &  (2949.496)\\
mpg         &     21.2973\\
            &  (5.785503)\\
weight      &    3019.459\\
            &  (777.1936)\\
\hline
\(N\)       &          74\\
\hline\hline
\end{tabular}
}