1

I have the following problem: Math syntax doesn't work for the labels in the second row in my table for h=1, h=3, h=6. How can i fix it?

Here is my code for it. Thank you

5
  • 1
    Could you please make your code compilable? (See minimal working example (MWE)) How is \twoS defined?
    – leandriis
    Commented Jul 29, 2019 at 21:15
  • \newcommand*{\oneS}{\SuperScriptSameStyle{*}} \newcommand*{\twoS}{\SuperScriptSameStyle{**}} \newcommand*{\threeS}{\SuperScriptSameStyle{*{*}*}}
    – tibiooo
    Commented Jul 29, 2019 at 21:21
  • 1
    How/Where is \SuperScriptSameStyle defined?
    – leandriis
    Commented Jul 29, 2019 at 21:24
  • \newcommand*{\SuperScriptSameStyle}[1]{% \ensuremath{% \mathchoice {{}^{\displaystyle #1}}% {{}^{\textstyle #1}}% {{}^{\scriptstyle #1}}% {{}^{\scriptscriptstyle #1}}% }% }
    – tibiooo
    Commented Jul 29, 2019 at 21:25
  • 1
    Please edit your question to include this additional information. Please also inclue teh documentclass as well as the relevant packages in order to make your code compilable without the need to guess some settings.
    – leandriis
    Commented Jul 29, 2019 at 21:47

1 Answer 1

1

Here is part of your table. I have used tabularx for automated line breaks in the last column, threeparttablex for the formatting of the tablenotes, added some sisetup options nd removed unnecessary \multicolumn commands as well as empty rows. Adapting the rest of the table is now up to you.

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{pdflscape}
\usepackage{booktabs}\usepackage{siunitx}
\usepackage{multirow}
\newcommand*{\SuperScriptSameStyle}[1]{% 
\ensuremath{% 
\mathchoice {{}^{\displaystyle #1}}% 
{{}^{\textstyle #1}}% 
{{}^{\scriptstyle #1}}% 
{{}^{\scriptscriptstyle #1}}%
 }% 
 } 
\newcommand*{\oneS}{\SuperScriptSameStyle{*}} 
\newcommand*{\twoS}{\SuperScriptSameStyle{**}} 
\newcommand*{\threeS}{\SuperScriptSameStyle{*{*}*}}
\usepackage{tabularx}
\usepackage[flushleft, para, referable]{threeparttablex}
\setTableNoteFont{\itshape}
\begin{document}

\begin{landscape}
\begin{table}[htbp]
\begin{threeparttable}
\centering
\sisetup{
    table-align-text-pre     = false,
    table-align-text-post    = false,
    input-open-uncertainty   = ,
    input-close-uncertainty  = ,
    table-space-text-post    = \threeS,
    table-space-text-pre     = {(},
    parse-numbers = false,
}


\caption{RMSFE for $h=1, h=3$ and $h=6$ Step-Ahead Forecasts of $\Delta UR_{t}$}
 \begin{tabularx}{\linewidth}{ll*{3}{S[table-format=2.4]}X}
 \toprule
       &       & \multicolumn{3}{c}{RMSFE} &  \\
\cmidrule{3-5}  
       &       & \multicolumn{3}{c}{Forecast Horizon} &  \\
 Variable & Model & {$h=1$}   &  {$h=3$}   & {$h=6$}   &  Details \\
 \midrule
 $\Delta UR_{t}$ & AR$(BIC)$ & 0.1750 & 0.1996 & 0.2346 &  $h$-step ahead forecasts with AR model in $\Delta UR_{t}$, lags determined by $BIC$ \\
       &       &       &       &       &  \\ \addlinespace
 $\Delta UR_{t}$, $\Delta G1_{t}$ & VAR$(BIC)$ & 0.1613\oneS & 0.1606\oneS & 0.1816\twoS &  \multirow[t]{2}{=}{$\Delta UR_{t}$ $h$-step-ahead forecasts with VAR model in $\Delta UR_{t}$ and $\Delta G1_{t}$, lags determined by $BIC$} \\
       &       & [1.8387] & [1.8416] & [2.0047] &   \\

 \bottomrule
 \end{tabularx}%
 \begin{tablenotes}
 \note Critical values of the DM test: $10\% = 1.64, 5\% =1.96$ and $1\% = 2.34$. \newline DM test statistics are given in the brackets, asteriks indicate significance at: \oneS 10\%, \twoS 5\% and \threeS 1\%
 \end{tablenotes}
 \end{threeparttable}
\end{table}%
\end{landscape}

\end{document}
0

You must log in to answer this question.

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