4

I have exported my tables from STATA using esttab, 3 of the 4 of my tables are the same size, however, one of them seems to be smaller, even though they all have the same number of elements, the only thing that differs is the numbers contained within.

\begin{table}[h]

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{Table B2}
\begin{tabular}{l*{8}{c}}
\toprule
                &\multicolumn{1}{c}{OLS}&\multicolumn{1}{c}{0.1}&\multicolumn{1}{c}{0.2}&\multicolumn{1}{c}{0.4}&\multicolumn{1}{c}{0.5}&\multicolumn{1}{c}{0.6}&\multicolumn{1}{c}{0.8}&\multicolumn{1}{c}{0.9}\\
\midrule
dsentiment      &  -0.0906\sym{*}  &  -0.0929         &  -0.0923\sym{*}  &  -0.0912\sym{**} &  -0.0908\sym{**} &  -0.0904\sym{*}  &  -0.0892         &  -0.0881         \\
                & (0.0358)         & (0.0552)         & (0.0448)         & (0.0340)         & (0.0338)         & (0.0364)         & (0.0539)         & (0.0751)         \\
\addlinespace
dsubmissions    &   0.0445\sym{***}&   0.0208         &   0.0272\sym{*}  &   0.0380\sym{***}&   0.0432\sym{***}&   0.0475\sym{***}&   0.0603\sym{***}&   0.0717\sym{***}\\
                &(0.00985)         & (0.0152)         & (0.0124)         &(0.00947)         &(0.00940)         & (0.0101)         & (0.0150)         & (0.0208)         \\
\addlinespace
lag\_vol         &    0.616\sym{***}&    0.658\sym{***}&    0.647\sym{***}&    0.628\sym{***}&    0.619\sym{***}&    0.611\sym{***}&    0.589\sym{***}&    0.569\sym{***}\\
                & (0.0459)         & (0.0822)         & (0.0668)         & (0.0508)         & (0.0505)         & (0.0543)         & (0.0804)         &  (0.112)         \\
\addlinespace
stdev\_lag       &   -3.251\sym{*}  &   -4.558         &   -4.203\sym{*}  &   -3.608\sym{*}  &   -3.320\sym{*}  &   -3.084         &   -2.380         &   -1.749         \\
                &  (1.468)         &  (2.525)         &  (2.052)         &  (1.559)         &  (1.549)         &  (1.667)         &  (2.468)         &  (3.438)         \\
\addlinespace
autocov         &   0.0973\sym{***}&   0.0971\sym{***}&   0.0972\sym{***}&   0.0972\sym{***}&   0.0973\sym{***}&   0.0973\sym{***}&   0.0974\sym{***}&   0.0975\sym{**} \\
                & (0.0166)         & (0.0259)         & (0.0210)         & (0.0160)         & (0.0159)         & (0.0171)         & (0.0253)         & (0.0352)         \\
\addlinespace
Constant        &    8.189\sym{***}&                  &                  &                  &                  &                  &                  &                  \\
                &  (0.946)         &                  &                  &                  &                  &                  &                  &                  \\
\midrule
Observations    &      459         &      459         &      459         &      459         &      459         &      459         &      459         &      459         \\
\bottomrule
\multicolumn{9}{l}{\footnotesize Standard errors in parentheses}\\
\multicolumn{9}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\

\end{tabular}

\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{Table B3}
\begin{tabular}{l*{8}{c}}
\toprule
                &\multicolumn{1}{c}{OLS}&\multicolumn{1}{c}{0.1}&\multicolumn{1}{c}{0.2}&\multicolumn{1}{c}{0.4}&\multicolumn{1}{c}{0.5}&\multicolumn{1}{c}{0.6}&\multicolumn{1}{c}{0.8}&\multicolumn{1}{c}{0.9}\\
\midrule
dsentiment      &   -0.343\sym{***}&  -0.0907         &   -0.167         &   -0.271         &   -0.317\sym{*}  &   -0.364\sym{*}  &   -0.488\sym{***}&   -0.637\sym{**} \\
                & (0.0861)         &  (0.306)         &  (0.252)         &  (0.185)         &  (0.161)         &  (0.143)         &  (0.143)         &  (0.226)         \\
\addlinespace
dsubmissions    &    0.150\sym{***}&   0.0664         &   0.0917         &    0.126\sym{**} &    0.142\sym{***}&    0.157\sym{***}&    0.198\sym{***}&    0.248\sym{***}\\
                & (0.0190)         & (0.0693)         & (0.0571)         & (0.0420)         & (0.0366)         & (0.0327)         & (0.0332)         & (0.0537)         \\
\addlinespace
lag\_vol         &    0.886\sym{***}&    0.837\sym{***}&    0.852\sym{***}&    0.872\sym{***}&    0.882\sym{***}&    0.891\sym{***}&    0.915\sym{***}&    0.944\sym{***}\\
                & (0.0283)         &  (0.133)         &  (0.109)         & (0.0802)         & (0.0696)         & (0.0617)         & (0.0614)         & (0.0948)         \\
\addlinespace
stdev\_lag       &   -1.210\sym{***}&   -1.669         &   -1.531         &   -1.341         &   -1.256         &   -1.171         &   -0.944         &   -0.673         \\
                &  (0.346)         &  (2.238)         &  (1.837)         &  (1.346)         &  (1.168)         &  (1.036)         &  (1.028)         &  (1.582)         \\
\addlinespace
autocov         &    0.178\sym{***}&    0.211         &    0.201         &    0.187         &    0.181\sym{*}  &    0.175\sym{*}  &    0.159\sym{*}  &    0.140         \\
                & (0.0375)         &  (0.169)         &  (0.139)         &  (0.102)         & (0.0882)         & (0.0782)         & (0.0776)         &  (0.119)         \\
\addlinespace
Constant        &    2.273\sym{***}&                  &                  &                  &                  &                  &                  &                  \\
                &  (0.537)         &                  &                  &                  &                  &                  &                  &                  \\
\midrule
Observations    &      345         &      345         &      345         &      345         &      345         &      345         &      345         &      345         \\
\bottomrule
\multicolumn{9}{l}{\footnotesize Standard errors in parentheses}\\
\multicolumn{9}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\

\end{tabular}

\end{table}

Table 4 being smaller than table 5

I would appreciate some help in making them the same size, thank you

2
  • 3
    you have \begin{tabular}{l*{8}{c}} a c column has no specified width it is as wide as the data contained in the column so different tables will be different widths Commented Sep 2, 2021 at 22:32
  • Welcome to TeX.SE.
    – Mico
    Commented Sep 3, 2021 at 0:31

1 Answer 1

4

I have two main suggestions.

  • In the case of your tables, it would seem desirable not to center-set the numbers in the 8 data columns but to align them on their decimal markers. This may be done by loading the dcolumn package and employing the package's D column type. As a side-effect of making this change, the data columns will also line up across the tables.

  • To make sure that both tables fit inside the textblock, I suggest you replace the tabular environments with tabular* environments, with widths set to \textwidth (and with \tabcolsep set to 0pt).

enter image description here

\documentclass{article} % or some other suitable document class
\usepackage[letterpaper,margin=1in]{geometry} % set the page parameters appropriately
\usepackage{booktabs}
\usepackage{dcolumn} % for 'D' column type
\newcolumntype{d}[1]{D..{#1}}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}

\begin{document}

\begin{table}
\setlength{\tabcolsep}{0pt} % let LaTeX figure out inter-column whitespace amounts

\caption{Table B2\strut}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l *{8}{d{2.6}} }
\toprule
&\mc{OLS}&\mc{0.1}&\mc{0.2}&\mc{0.4}&\mc{0.5}&\mc{0.6}&\mc{0.8}&\mc{0.9}\\
\midrule
dsentiment      &  -0.0906\sym{*}  &  -0.0929         &  -0.0923\sym{*}  &  -0.0912\sym{**} &  -0.0908\sym{**} &  -0.0904\sym{*}  &  -0.0892         &  -0.0881         \\
                & (0.0358)         & (0.0552)         & (0.0448)         & (0.0340)         & (0.0338)         & (0.0364)         & (0.0539)         & (0.0751)         \\
\addlinespace
dsubmissions    &   0.0445\sym{***}&   0.0208         &   0.0272\sym{*}  &   0.0380\sym{***}&   0.0432\sym{***}&   0.0475\sym{***}&   0.0603\sym{***}&   0.0717\sym{***}\\
                &(0.00985)         & (0.0152)         & (0.0124)         &(0.00947)         &(0.00940)         & (0.0101)         & (0.0150)         & (0.0208)         \\
\addlinespace
lag\_vol         &    0.616\sym{***}&    0.658\sym{***}&    0.647\sym{***}&    0.628\sym{***}&    0.619\sym{***}&    0.611\sym{***}&    0.589\sym{***}&    0.569\sym{***}\\
                & (0.0459)         & (0.0822)         & (0.0668)         & (0.0508)         & (0.0505)         & (0.0543)         & (0.0804)         &  (0.112)         \\
\addlinespace
stdev\_lag       &   -3.251\sym{*}  &   -4.558         &   -4.203\sym{*}  &   -3.608\sym{*}  &   -3.320\sym{*}  &   -3.084         &   -2.380         &   -1.749         \\
                &  (1.468)         &  (2.525)         &  (2.052)         &  (1.559)         &  (1.549)         &  (1.667)         &  (2.468)         &  (3.438)         \\
\addlinespace
autocov         &   0.0973\sym{***}&   0.0971\sym{***}&   0.0972\sym{***}&   0.0972\sym{***}&   0.0973\sym{***}&   0.0973\sym{***}&   0.0974\sym{***}&   0.0975\sym{**} \\
                & (0.0166)         & (0.0259)         & (0.0210)         & (0.0160)         & (0.0159)         & (0.0171)         & (0.0253)         & (0.0352)         \\
\addlinespace
Constant        &    8.189\sym{***} \\
                &  (0.946)          \\
\midrule
Observations    & \mc{459} & \mc{459} & \mc{459} & \mc{459} & \mc{459} & \mc{459} & \mc{459} & \mc{459} \\
\bottomrule
\addlinespace
\multicolumn{9}{l}{\footnotesize Standard errors in parentheses.
\quad \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\).}\\

\end{tabular*}


\bigskip
\caption{Table B3\strut}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l *{8}{d{2.6}} }
\toprule
&\mc{OLS}&\mc{0.1}&\mc{0.2}&\mc{0.4}&\mc{0.5}&\mc{0.6}&\mc{0.8}&\mc{0.9}\\
\midrule
dsentiment      &   -0.343\sym{***}&  -0.0907         &   -0.167         &   -0.271         &   -0.317\sym{*}  &   -0.364\sym{*}  &   -0.488\sym{***}&   -0.637\sym{**} \\
                & (0.0861)         &  (0.306)         &  (0.252)         &  (0.185)         &  (0.161)         &  (0.143)         &  (0.143)         &  (0.226)         \\
\addlinespace
dsubmissions    &    0.150\sym{***}&   0.0664         &   0.0917         &    0.126\sym{**} &    0.142\sym{***}&    0.157\sym{***}&    0.198\sym{***}&    0.248\sym{***}\\
                & (0.0190)         & (0.0693)         & (0.0571)         & (0.0420)         & (0.0366)         & (0.0327)         & (0.0332)         & (0.0537)         \\
\addlinespace
lag\_vol         &    0.886\sym{***}&    0.837\sym{***}&    0.852\sym{***}&    0.872\sym{***}&    0.882\sym{***}&    0.891\sym{***}&    0.915\sym{***}&    0.944\sym{***}\\
                & (0.0283)         &  (0.133)         &  (0.109)         & (0.0802)         & (0.0696)         & (0.0617)         & (0.0614)         & (0.0948)         \\
\addlinespace
stdev\_lag       &   -1.210\sym{***}&   -1.669         &   -1.531         &   -1.341         &   -1.256         &   -1.171         &   -0.944         &   -0.673         \\
                &  (0.346)         &  (2.238)         &  (1.837)         &  (1.346)         &  (1.168)         &  (1.036)         &  (1.028)         &  (1.582)         \\
\addlinespace
autocov         &    0.178\sym{***}&    0.211         &    0.201         &    0.187         &    0.181\sym{*}  &    0.175\sym{*}  &    0.159\sym{*}  &    0.140         \\
                & (0.0375)         &  (0.169)         &  (0.139)         &  (0.102)         & (0.0882)         & (0.0782)         & (0.0776)         &  (0.119)         \\
\addlinespace
Constant        &    2.273\sym{***} \\
                &  (0.537)          \\
\midrule
Observations    & \mc{345} & \mc{345} & \mc{345} & \mc{345} & \mc{345} & \mc{345} & \mc{345} & \mc{345} \\
\bottomrule
\addlinespace
\multicolumn{9}{l}{\footnotesize Standard errors in parentheses. 
\quad \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\).}\\

\end{tabular*}

\end{table}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .