我已用 编辑了下表\usepackage{booktabs}
。
但是,在第一次和第二次回归之间,有一个奇怪的垂直空间。如何删除这两列之间的空间,并让它们全部对齐,中间的垂直空间相同?
\begin{table}[thb]
\centering
\label{tab:first_wave_week}
\small
\scriptsize
\setlength{\tabcolsep}{1pt}
\renewcommand{\arraystretch}{1}
\caption{First Covid-19 wave - Dependent Variable: Transactions_{it}} \\
\vskip 3pt
\begin{tabular}{l dddd}
\toprule
\textbf{Regressors}
& \mc{\textbf{(1)}}
& \mc{\textbf{(2)}}
& \mc{\textbf{(3)}}
& \mc{\textbf{(4)}}
\\
\midrule
Covid-19_{it}
& -0.1094^{***}
& -0.0869^{***}
& -0.1014^{***}
& -0.0891^{***}
\\
& (0.0406)
& (0.0312)
& (0.0423)
& (0.0332)
\\
Trans_{it{-1}}
&
& 0.5993^{***}
&
& 0.6026^{***}
\\
&
& (0.0105)
&
& (0.0107)
\\
Trans_{it{-2}}
&
& 0.0995^{***}
&
& 0.0993^{***}
\\
&
& (0.0054)
&
& (0.0055)
\\
Unemp_{it}
&
&
& -0.2598^{***}
& -0.0785
\\
&
&
& (0.0669)
& (0.0527)
\\
\midrule
$N$
& \mc{332}
& \mc{332}
& \mc{332}
& \mc{319}
\\
$T$
& \mc{30}
& \mc{30}
& \mc{30}
& \mc{30}
\\
$FE$
& \mc{Both}
& \mc{Both}
& \mc{Both}
& \mc{Both}
\\
$R^{2}$
& 0.0010
& 0.3800
& 0.0031
& 0.3840
\\
\midrule[\heavyrulewidth]
\multicolumn{2}{l}{(Standard errors clustered by municipality in parentheses)}\\
\multicolumn{2}{l}{$^{***}\ p<0.01$; $^{**}\ p<0.05$; $^{*}\ p<0.1$}\\
\end{tabular}
\end{table}
\\
答案1
我将使用threeparttable
和tablenotes
作为表格注释,S
在包中定义的列带siunitx
和\thead
在中定义的命令作为makecell
列标题:
\documentclass{article}
\usepackage{booktabs, makecell}
\renewcommand\theadfont{\bfseries}
\usepackage[referable]{threeparttablex}
\usepackage[skip=1ex]{caption}
\usepackage{siunitx} % considered is v3
\begin{document}
\begin{table}[htb]
\centering
\sisetup{
table-align-text-before= false, % <---
input-open-uncertainty =,
input-close-uncertainty=,
table-format={(}-1.4{$^{***}$},
}
\begin{threeparttable}
\caption{First Covid-19 wave - Dependent Variable: Transactions\textsubscript{it}}
\begin{tabular}{l *{4}{S} }
\toprule
\thead{Regressors}
& {\thead{(1)}}
& {\thead{(2)}}
& {\thead{(3)}}
& {\thead{(4)}} \\
\midrule
Covid-19\textsubscript{it}
& -0.1094\tnote{***}
& -0.0869\tnote{***}
& -0.1014\tnote{***}
& -0.0891\tnote{***} \\
& (0.0406)
& (0.0312)
& (0.0423)
& (0.0332) \\
\addlinespace
Trans\textsubscript{it - 1}
& & 0.5993\tnote{***}
& & 0.6026\tnote{***} \\
& & (0.0105)
& & (0.0107) \\
\addlinespace
Trans\textsubscript{it - 2}
& & 0.0995\tnote{***}
& & 0.0993\tnote{***} \\
& & (0.0054)
& & (0.0055) \\
\addlinespace
Unemp\textsubscript{it}
& & & -0.2598\tnote{***}
& -0.0785 \\
& & & (0.0669)
& (0.0527) \\
\midrule
$N$ & {332}
& {332}
& {332}
& {319} \\
$T$ & {30}
& {30}
& {30}
& {30} \\
$FE$
& {Both}
& {Both}
& {Both}
& {Both} \\
$R^{2}$
& 0.0010
& 0.3800
& 0.0031
& 0.3840 \\
\bottomrule
\end{tabular}
\begin{tablenotes}[flushleft, para]\footnotesize
\note{Standard errors clustered by municipality are in parentheses:}\\
\item[***] $p<0.01$,
\item[**] $p<0.05$,
\item[*] $p<0.1$
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}