2

I want to create a table like this:

enter image description here

Here is the code:

\begin{table}[h]
\begin{threeparttable}
\caption{\textit{Sample Selection}}
\centering
\begin{tabular}{lcccccccc}
\toprule\toprule
& (I) & (II) &  (III) & (IV) & (V) & (VI) & (VII) & (VIII) \\
Variables & ADA Model & GCONCERN Model & MEET Model & LOGFEES Model & ADA Model & GCONCERN Model & MEET Model & LOGFEES Model\\\midrule 
NLEAD & 0.000& -0.037& 0.0301& 0.006&&&& \\
& (0.15) & (-0.16) & (0.35)  & (0.36) &&&& \\
CLEAD &&&& 0.000 &-0.038 & -0.098 & 0.020  \\
&&&& (0.22) & (-0.21) & (-0.92)  & (1.43) \\
Observations & 75,188 & 6,077 & 11,165 & 24,279 & 23,306 & 3,856 & 5,632 & 16,388\\
Adjusted $R^2$ & 0.045 & 0.149 & 0.026 & 0.694 & 0.041 & 0.155 & 0.027 & 0.711\\
\bottomrule
\end{tabular} 
\begin{tablenotes}
      \small
      \item This is where authors provide additional information about
      the data, including whatever notes are needed.
    \end{tablenotes}
\end{threeparttable}
\end{table}

I am using booktabs & caption package. Some of the issues which I am facing goes below:

  1. Even though I am getting bold Table 7, but it's not capitalized and not on a separate line
  2. I have lot of spaces in my table and hence can't see the full table in the output. How do I reduce the spacing between columns?
  3. I am getting space between caption and toprule and note and bottomrule. How can redefine the space distance. I know I can use vspace, but I want to redefine the space option. Thanks.
  • 3
    Welcome to TeX SX! Please provide a Minimal Working Example (MWE). It is easier for people to run your document and help you. – TeXtnik Mar 20 '14 at 7:42
  • In principle you can use booktabs with longtable; they don't exclude each other. For the format of the caption the use the caption package may help – TeXtnik Mar 20 '14 at 7:44
3

Here is an (hopefully) almost complete solution, which consists in defining a new display caption style, and loading makecell (allows the use of \\ in cells), siunitxto align vertically the decimal markers thanks to the S column type and, more anecdotically, microtype to have some letter spacing in the caption.

The result is not perfect, though, as the parentheses are not very well positioned – I had to make a manual correction in one of the cells, but I think it is acceptable.

    \documentclass{article}
    \usepackage[utf8]{inputenc}
    \usepackage[lf, mathtabular]{MinionPro}

    \usepackage[nomarginpar, textwidth = 15cm]{geometry}
    \usepackage{array, threeparttable, booktabs, caption}

    \usepackage{makecell}%
    \usepackage{siunitx}%

    \usepackage{microtype}
    \DeclareCaptionFormat{display}{\textls*[250]{\bfseries\MakeUppercase{#1}}\\[0.8ex]#3}
    \captionsetup{format=display, skip =-0.2ex}

    \begin{document}
    \setcounter{table}{6}

    \begin{table}[h]
    \centering\small%\renewcommand{\tabcolsep}{5pt}
    \begin{threeparttable}
    \caption{\textit{Sample Selection}}
    %
    \sisetup{table-figures-integer =1,table-figures-decimal =3, table-number-alignment=center, %
    table-align-text-pre=false,table-align-text-post=false,table-space-text-pre={(}, table-space-text-post={)}}%, parse-numbers=false
    \begin{tabular}{@{}l*{8}{S}@{}}
    \toprule\toprule%
    Variables & {\thead{(I)\\\emph{ADA}\\Model (1.43)}} &{\thead{(II)\\\emph{GCONCERN}\\Model}} & {\thead{(III)\\\emph{MEET}\\Model}} & {\thead{(IV)\\\emph{LOGFEES}\\Model}} & {\thead{(V)\\\emph{ADA}\\Model}} & {\thead{(VI)\\\emph{GCONCERN}\\Model}} & {\thead{(VII)\\\emph{MEET}\\Model}} & {\thead{(VIII)\\\emph{LOGFEES}\\Model}}\\
    \midrule
    \addlinespace
    \emph{NLEAD} & 0.000 & -0.037 & 0.0301 & 0.006 & & & & \\%
    &{(}0.15{)} & {(}-0.16{)}& {(}0.35{)} & {(}0.36{)} & & & & \\%
    \addlinespace
    \emph{CLEAD} & & & & & 0.000 & -0.038 & -0.098 & 0.020 \\
    & & & & & {(}0.22{)} & {(}0.21{)} & {(}0.92{)} & {(\kern -0.025em}1.43{)} \\
    \addlinespace
    Observations & {75,188}&{6,077} & {11,165} & {24,279} & {23,306} & {3,856} & {5,632} & {16,388}\\
    \addlinespace
    Adjusted $R²$ & 0.045 & 0.149 & 0.026 & 0.694 & 0.041 & 0.155 & 0.027 & 0.711\\%
    \addlinespace
    \bottomrule
    \end{tabular}
    %
    \begin{tablenotes}
          \small
          \item This is where authors provide additional information about
          the data, including whatever notes are needed.
        \end{tablenotes}
    \end{threeparttable}
    \end{table}

    \end{document} 

enter image description here

0

I have been able to get the caption as I wished by loading the caption package in the following manner:

\usepackage[bf,tablename=TABLE,labelsep=newline,aboveskip=0pt]{caption}

Here bf makes label "Table" bold, tablename = TABLE changes the default label to TABLE, labelsep=newline begins caption on a new line, and aboveskip=0pt reduces the distance between caption and topmargin.

To generate a note under the table I have used the package threeparttable. The code in the question has been updated to reflect the same.

Still struggling with other problems.

  • define a new column type \newcolumntype{M}{>{\centering\arraybackslash}m{1.8cm}} and then change c column specifiers into M to solve the space between columns issue. – Jesse Mar 20 '14 at 10:45

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.