2

I am trying to fix the words under the lines in the headings (for some reason they are stacked next to each other). Furthermore, I dont know why the numbers between brackets do not show in the tables.

Here is the LaTeX code

\documentclass[11pt,a4paper]{article}
\usepackage{amssymb, amsmath, bm}
\usepackage[flushleft]{threeparttable}
\usepackage{float, booktabs, makecell, caption, tabularx}
\usepackage{siunitx}

\begin{document}

\begin{table}[htb!]

\caption{\textbf{Estimates for the TVTPs and average TVTP in each regime}}
\label{table:mstvtp_estimation_results}

\centering\scriptsize
\renewcommand{\TPTminimum}{\linewidth}

\setlength{\tabcolsep}{2pt}
\setlength{\extrarowheight}{2pt}

\begin{tabular}{@{} l *{6}{S[table-format=1.3]} @{}}
\bottomrule
\specialrule{0.4pt}{\aboverulesep}{0pt}
& \multicolumn{2}{c}{MS-TVTP}
& \multicolumn{2}{c@{}}{MS-DRA-TVTP} \\ 
\cmidrule(l){2-3} \cmidrule(l){4-5}
&  \thead[l]{$S_t = 1$} & \thead[l]{$S_t = 2$} &  \thead[l]{$S_t = 1$} & \thead[l]{$S_t = 2$}  \\
\Xhline{0.5pt}
Constant   & $ \bm{7.000} $ & $ \bm{-0.999} $ & \bm{6.223}             & \bm{2.101}  \\
           & (0.112)        & (0.460)         &  (0.134)     & (0.512)     \\
GDP Growth & $ \bm{1.834} $ & $ \bm{-0.626} $ & \bm{1.147}             & \bm{-0.028} \\
           & (0.659)   & (0.277)              & (0.647)             & (0.291)     \\
FFR        & 0.420     & 0.369                & -0.323            & -0.493                  \\
           & (0.602)   & (0.514)              & (0.748) & (0.544)                 \\
CPI Growth & -0.292    & $ \bm{2.000} $       & -0.327            & \bm{1.141}              \\
           & (0.839)   & (0.597)              & (0.760) & (0.612)                 \\
Avg. p_{11}& 0.928     &                      & 0.922             \\
Avg. p_{22}& 0.993     &                      & 0.934              \\
\Xhline{0.8pt}
\end{tabular}
\medskip

\begin{tablenotes}[flushleft]\footnotesize\smallskip
 \item Note: This table reports estimates of the MS-TVTP model. Panel (A) presents estimates for the autoregressive coefficient matrix $\boldsymbol{F}$, vector of means during periods of normal interest rates ($\boldsymbol{\mu}_1$) and low interest rates ($\boldsymbol{\mu}_2$), decay parameter $\lambda$ and average transition probabilities $p_{11}$ and $p_{22}$. Panel (B) presents estimates of the logistic function which is used to compute the time-varying transition probabilities. Bold entries denote parameter estimates significant at the five percent level. Standard errors appear in parentheses.
\end{tablenotes}

\end{table}

\end{document} 

Thank you in advance.

Matthew
  • 315
  • Why do you define a total of 7 columns when you actually only use 5 of them? Apart from that, you might want to have a look at https://tex.stackexchange.com/a/66256/134144 which is about bold numbers in siunitx's columns. – leandriis Jul 23 '19 at 17:32
  • Do you mean I should change \begin{tabular}{@{} l *{6}{S[table-format=1.3]} @{}} into \begin{tabular}{@{} l *{4}{S[table-format=1.3]} @{}} ? – Matthew Jul 23 '19 at 17:35
  • That might help to remove unnecessary columns. Nevertheless, your code generates a lot of errer messages that will not be removed by this change. – leandriis Jul 23 '19 at 17:36

1 Answers1

1

Here is my suggestion. I have replaced $\bm with \bfseries (and added \usepackage{etoolbox} \robustify\bfseries as discussed here), removed unnecessary columns and changed some siunitx settings. I have also removed the textbf command from the caption and used \captionsetup from the caption package instead. Lastly, I have also commented out some of the commands that changed sizes and spaces (\scriptsize and \tabcolsep) as the table perfectly fits into the textwidth without them.

enter image description here

\documentclass[11pt,a4paper]{article}
\usepackage{amssymb, amsmath}
\usepackage[flushleft]{threeparttable}
\usepackage{float, booktabs, makecell, caption, tabularx}
\usepackage{siunitx}

\usepackage{etoolbox}
\robustify\bfseries

\sisetup{input-symbols = {()}, detect-weight=true}

\captionsetup{font=bf}

\begin{document}

\begin{table}[htb!]
\caption{Estimates for the TVTPs and average TVTP in each regime}
\label{table:mstvtp_estimation_results}

\centering%\scriptsize
%\renewcommand{\TPTminimum}{\linewidth}

%\setlength{\tabcolsep}{2pt}
\setlength{\extrarowheight}{2pt}

\begin{tabular}{@{} l *{4}{S[table-format=-1.4]} @{}}
\bottomrule
\specialrule{0.4pt}{\aboverulesep}{0pt}
& \multicolumn{2}{c}{MS-TVTP} & \multicolumn{2}{c@{}}{MS-DRA-TVTP} \\ 
\cmidrule(r){2-3} \cmidrule(l){4-5}
&  {\thead[l]{$S_t = 1$}} & {\thead[l]{$S_t = 2$}} &  {\thead[l]{$S_t = 1$}} & {\thead[l]{$S_t = 2$}}  \\
\Xhline{0.5pt}
Constant   & \bfseries 7.000 & \bfseries -0.999 & \bfseries 6.223            & \bfseries 2.101  \\
           & (0.112)        & (0.460)         &  (0.134)     & (0.512)     \\
GDP Growth & \bfseries 1.834 & \bfseries -0.626 & \bfseries 1.147             & \bfseries -0.028 \\
           & (0.659)   & (0.277)              & (0.647)             & (0.291)     \\
FFR        & 0.420     & 0.369                & -0.323            & -0.493                  \\
           & (0.602)   & (0.514)              & (0.748) & (0.544)                 \\
CPI Growth & -0.292    & \bfseries 2.000       & -0.327            & \bfseries 1.141              \\
           & (0.839)   & (0.597)              & (0.760) & (0.612)                 \\
Avg. p\textsubscript{11}& 0.928     &                      & 0.922             \\
Avg. p\textsubscript{22}& 0.993     &                      & 0.934              \\
\Xhline{0.8pt}
\end{tabular}
\medskip

\begin{tablenotes}[flushleft]\footnotesize\smallskip
\item Note: This table reports estimates of the MS-TVTP model. Panel (A) presents estimates for the autoregressive coefficient matrix $\boldsymbol{F}$, vector of means during periods of normal interest rates ($\boldsymbol{\mu}_1$) and low interest rates ($\boldsymbol{\mu}_2$), decay parameter $\lambda$ and average transition probabilities $p_{11}$ and $p_{22}$. Panel (B) presents estimates of the logistic function which is used to compute the time-varying transition probabilities. Bold entries denote parameter estimates significant at the five percent level. Standard errors appear in parentheses.
\end{tablenotes}

\end{table}

\end{document} 
leandriis
  • 62,593