在 Stata 的 esttab 中,省略模型名称行

In Stata's esttab, omit line of model names

我正在使用 Stata 使用 esttab 生成回归 tables,我想将这些 tables 包含在我的 Latex 文档中。

我正在生成这样的回归 table:

sysuse auto
eststo: regress price weight 
eststo: regress price weight mpg
eststo: regress price weight mpg headroom
eststo: regress price weight mpg length
esttab using "test.tex", nocons b(a2) replace stats(N r2, labels("Obs." "R$^2$")) nonumbers fragment booktabs 

然后我使用下面的 Latex 代码生成我的 table:

\documentclass[11pt, a4paper]{article}

\usepackage{booktabs}
\usepackage[flushleft]{threeparttable}

\begin{document}

\begin{table}[!t]
\begin{small}
\begin{threeparttable}
{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{tabular}{lllll}
\toprule
& \multicolumn{4}{c}{\textit{Dep. var: } price in dollars} \
\cline{2-5} 
 & (1) & (2) & (3) & (4)\
 \midrule
\input{test.tex}
\bottomrule
\end{tabular}
}
\end{threeparttable}
\begin{tablenotes}
\item\textit{Note:} Here I'm putting many great comments about my regression setup. *** p$<[=11=].01, ** p$<[=11=].05, * p$<[=11=].1.
\end{tablenotes}
\end{small}
\end{table}

\end{document}

产生:

如果我能简单地告诉 esttab 不要生成这一行模型名称,我所有的问题都会得到解决。

有什么想法吗?


编辑: Eric HB 在下面回答了如何删除模型名称行的问题。后续问题如何包含\midrule开头的Latex代码得到解答here.

包括选项 nomtitles 将为您执行此操作,因此您的代码将是:

sysuse auto
eststo: regress price weight mpg
esttab using "test.tex", nocons b(a2) replace ///
   stats(N r2, labels("Obs." "R$^2$")) ///
   nonumbers fragment booktabs nomtitles

来自 help esttab

nomtitles suppresses printing of model titles.