2

On my previous question creating tables with multi row and column @zarko provide answer which not fulfill my requirements. i used it as base form new code for my table, but my effort doesnt gives what i expect. the code below gives:

enter image description here

documentclass[final,1p,times,authoryear]{elsarticle}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{}
\usepackage{siunitx}%
\usepackage{adjustbox}

\begin{document}
    \begin{table}[h]
    \centering
\caption{Augmented Dickey Fuller and KPSS Test Statistics for (Transformed) Sectoral Indices (y)}
\label{tab:statistics}
%\renewcommand{\arraystretch}{1.2}
%\sisetup{input-symbols={( - )},
         %table-space-text-pre={(},
         %table-space-text-post ={)},
         %}  
                    \begin{adjustbox}{max width=\textwidth}
    \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                            l
                       *{2}{S[table-format=-1.3]
                            @{\hspace{-1.2em}}
                             S[table-format=1.2]}
                                }
    \toprule
\thead[l]{\\Banking-industry specific variables}
    &   \multicolumn{2}{c}{\thead{Levin, Lin and\\ Chu (LLC)}}
        &   \multicolumn{2}{c}{\thead{ADF-Fisher\\ chi-square}}    \\
     \cmidrule(r){1-1}\cmidrule(r){2-3}\cmidrule{4-5}

Log of Loans-to-Assets  &-2.14  & &151.23& \\
&\textit{(0.05)}& &\textit{(0.02)}\\

Log of Credit quality &-0.486 & & 144.11& \\
&\textit{(0.04)}& &\textit{(0.01)}\\

Log of Diversification &2.441 & &112.23& \\
&\textit{(0.02)}& &\textit{(0.04)}\\

Log of Return on Assets &-3.235 & & 1.140& \\
&\textit{(0.01)}& &\textit{(0.03)}\\   

        \midrule
\textbf{Macroeconomic variables}
                        &       &           &
                                    \multicolumn{2}{c}{\thead{Fisher-ADF}}  \\
    \midrule
Real GDP growth         &       &           & -1.66     &   \\
&&&\textit{(0.048)}\\ 
$\Delta$ infl (inflation) &       &           & -4.62     &    \\
&&&\textit{(0.145)}\\ 

$\Delta$ Ur (unemployment rate)   &       &           & -1.45     &    \\
&&&\textit{(0.014)}\\ 

Exchange rate           &       &           & -0.76     &   \\
&&&\textit{(0.042)}\\ 

    \midrule
\textbf{Household-level indicators}
                        &       &           &
                                    \multicolumn{2}{c}{\thead{Fisher-ADF}}  \\
    \midrule
Income                  &       &           & 1.30      &          \\
&&&\textit{(0.001)}\\ 

Family size             &       &           & -1.07     &         \\
&&&\textit{(0.007)}\\ 

Age                     &       &           & -3.02     &        \\
&&&\textit{(0.002)}\\ 

Education               &       &           & -1.91     &       \\
&&&\textit{(0.000)}\\ 

    \bottomrule
\end{tabular*}
        \end{adjustbox}
    \end{table}
\end{document} 
  • you should tel us, what is the problem :-). as far as i can see, you should removed not used columns ... also it would be nice from you, if you mentioned, that code in your question is based on mine answer – Zarko Sep 7 '18 at 18:22
  • i'm sorry ur right, i have mentioned ur name in the question, acutually i want to reduce the size of the hall table – Haithem Sep 7 '18 at 18:40
  • avtualy you should ad link to your previous, not mentioned my name as such. since i didn't suggest such a solution but something else. you try to redesign my solution and you stuck in this. i will take liberty and edit your question and add mentioned information. – Zarko Sep 7 '18 at 18:45
1

Some comments and observations:

  • There's no need for adjustbox.

  • Keep the column structure simple: One column for labels, two columns for data.

  • Using the siunitx package and its S column type may be a bit of overkill for the current typesetting needs. All that's needed is the dcolumn package.

  • Less visual drama, please -- there's no need for bold-facing and italics, really.

enter image description here

\documentclass[1p,times]{elsarticle}
\usepackage{booktabs,dcolumn}
\newcolumntype{d}[1]{D..{#1}}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}}

\begin{document}
\begin{table}[h]
\caption{Augmented Dickey Fuller and KPSS Test Statistics for (Transformed) Sectoral Indices (y)}
\label{tab:statistics}
\setlength\tabcolsep{0pt} % make LaTeX do all the work

\smallskip
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l d{2.3} d{3.3} }
\toprule
Banking-industry specific variables
    &  \mc{Levin, Lin and Chu (LLC)}
    &  \mc{ADF-Fisher chi-square}    \\
\cmidrule{1-1}\cmidrule{2-2}\cmidrule{3-3}

Log of Loans-to-Assets  &-2.14  & 151.23 \\
                        &(0.05) & (0.02) \\
Log of Credit quality   &-0.486 & 144.11 \\
                        &(0.04) & (0.01) \\
Log of Diversification  &2.441  & 112.23 \\
                        &(0.02) & (0.04) \\
Log of Return on Assets &-3.235 & 1.140  \\
                        &(0.01) & (0.03) \\   
\addlinespace
Macroeconomic variables &&\mc{Fisher-ADF}  \\
\cmidrule{1-1}\cmidrule{3-3}
Real GDP growth           && -1.66   \\
                          && (0.048) \\ 
$\Delta$ infl (inflation) && -4.62   \\
                          && (0.145)\\ 
$\Delta$ Ur (unemployment rate) && -1.45  \\
                          && (0.014) \\ 
Exchange rate             && -0.76   \\
                          && (0.042) \\ 
\addlinespace
Household-level indicators&& \mc{Fisher-ADF}  \\
\cmidrule{1-1}\cmidrule{3-3}
Income                    && 1.30    \\
                          && (0.001) \\ 
Family size               &&-1.07    \\
                          && (0.007) \\ 
Age                       &&-3.02    \\
                          && (0.002) \\ 
Education                 &&-1.91    \\
                          && (0.000) \\ 
\bottomrule
\end{tabular*}
\end{table}
\end{document} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.