2

I am trying to build a table displaying several regressions, yet I cannot get the columns aligned properly. The code is displayed below:

\begin{table}[h!]
\caption{Explanatory regressions}
\footnotesize
\centering
\label{tab:OOPS exp week}
\resizebox{\textwidth}{!}{%
\begin{tabular}{lcccc}
\toprule
\multicolumn{5}{c}{\parbox{\dimexpr\textwidth-2\tabcolsep}{%
\footnotesize Table VI presents the coefficients (p-values, calculated with Newey-West 
standard errors, are in square brackets) and the adjusted $R^{2}$ estimated in the 
explanatory regressions. The dependent variable is the weekly OOPS excess returns, and the 
independent variable is presented in the column 'Variable'. ** and *** indicate significance 
at
the 5.00\% and 1.00\% levels, respectively. The estimation period is between January 2012 
and December 2019, which translates to 416 observations.}}\\ 
\multicolumn{5}{c}{\parbox{\dimexpr\textwidth-2\tabcolsep}{%
}}\\
& OOPS excess returns & & & &
Variables & 1 & 2 & 3 & 4\\
\midrule
$r_{S\&P 500}-rf$ & 0.2825 & & & \\
& [13.10\%] & & & \\
$JUMP$ & & 0.9031 & & \\
& & [7.50\%] & & \\
$\Delta RV$ & & & 0.6697 & \\
& & & [8.30\%] & \\
$\Delta VIX$ & & & & -0.0005 \\
& & & & [74.20\%] \\
$\overline{R^{2}}$ & 0.90\% & 1.90\% & 1.10\% & -0.20\% \\
\bottomrule
\end{tabular}}
\end{table}

I have tried to implement a tabularx environment but was not successful.

1
  • Welcome to TeX.SE.
    – Mico
    Dec 21, 2020 at 18:42

1 Answer 1

2

I would use a simple, five-column tabular environment and expend some effort on making the legend intelligible and informative.

enter image description here

\documentclass{article}
\usepackage{amsmath,ragged2e,booktabs}
\begin{document}

\begin{table}[ht!]
\caption{Explanatory regressions\strut}  \label{tab:OOPSexpweek}

\Centering
\begin{tabular}{@{} l cccc @{}}
\toprule
Variables & \multicolumn{4}{c@{}}{OOPS excess returns} \\
\cmidrule(l){2-5}
& 1 & 2 & 3 & 4\\
\midrule
$r^{}_{\mathrm{S\&P 500}}-\mathit{rf}$ & 0.2825  \\
& [13.10\%]     \\ 
$\mathit{JUMP}$ & & 0.9031  \\
& & [7.50\%]    \\ 
$\Delta \mathit{RV}$ & & & 0.6697 \\
& & & [8.30\%]  \\ 
$\Delta \mathit{VIX}$ & & & & $-$0.0005 \\
& & & & [74.20\%] \\ \addlinespace
$\bar{R}^{2}$ & $0.009$ & $0.019$ & $0.011$ & $-0.002$ \\
\bottomrule
\end{tabular}

\justifying

\medskip\noindent \small
Table \ref{tab:OOPSexpweek} presents the coefficients---$p$-values, 
calculated with Newey-Weststandard errors, are in square brackets---and 
the adjusted $\bar{R}^{2}$ statistics from four explanatory regressions. 
The dependent variable is the weekly OOPS excess returns, and the 
independent variables are listed in the column `Variables'. **~and *** 
indicate significance at the 5\% and 1\% levels, respectively. The 
estimation period is January 2012 and December 2019; the number of 
observations is~416.

\end{table}
\end{document}

Addendum to address the OP's follow-questions.

  • To place the legend above rather than below the tabular environment, simply copy and paste the legend material to a location between \caption and \begin{tabular}.

  • To spread out the tabular material so that its width equals \textwidth, I suggest you employ a tabular* environment.

enter image description here

\documentclass{article}
\usepackage{array,booktabs}
\begin{document}

\begin{table}[ht!]
\setlength\tabcolsep{0pt}
\caption{Explanatory regressions\strut}  \label{tab:OOPSexpweek}

\medskip
\begingroup\small
This table presents the coefficients---$p$-values, 
calculated with Newey-West standard errors, are in square brackets---and 
the adjusted $\bar{R}^{2}$ statistics from four explanatory regressions. 
The dependent variable is the weekly OOPS excess returns, and the 
independent variables are listed in the column `Variables'. **~and *** 
indicate significance at the 5\% and 1\% levels, respectively. The 
estimation period is January 2012 and December 2019; the number of 
observations is~416.
\par\endgroup

\medskip
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l cccc }
\toprule
Variables & \multicolumn{4}{c}{OOPS excess returns} \\
\cmidrule{2-5}
& 1 & 2 & 3 & 4\\
\midrule
$r^{}_{\mathrm{S\&P 500}}-\mathit{rf}$ & 0.2825  \\
& [13.10\%]     \\ 
$\mathit{JUMP}$ & & 0.9031  \\
& & [7.50\%]    \\ 
$\Delta \mathit{RV}$ & & & 0.6697 \\
& & & [8.30\%]  \\ 
$\Delta \mathit{VIX}$ & & & & $-$0.0005 \\
& & & & [74.20\%] \\ \addlinespace
$\bar{R}^{2}$ & $0.009$ & $0.019$ & $0.011$ & $-0.002$ \\
\bottomrule
\end{tabular*}

\end{table}
\end{document}
3
  • Firstly, thank you very much for your answer, as i got closer to what i was looking for. Secondly, i got two problems when applying this solution to my project. First, I want to make the table in a way where it has the same width as the text, whilst maintaining the font size. Second, i really need to have the legend of the table on top of the table's contents and bellow the top, thick line that limits the table. Getting your insights on how to solve this would be awesome. Thank you very much Dec 22, 2020 at 15:38
  • @lourencoalves1 - Please see the addendum I just posted to above.
    – Mico
    Dec 22, 2020 at 15:56
  • It worked! thank you very much Dec 22, 2020 at 23:39

You must log in to answer this question.

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