2

I want to fit the following regression table in a single page. As you can see, a very small part of the table (the number of observations and footnotes) breaks into the next page. I've tried using arraystretch, but i've been unable to reduce it further than this.

Here's my code:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{apacite}
\usepackage{graphicx}
\usepackage{caption}        %for setting table caption
\captionsetup[table]{font={small,stretch=0.80}} % caption settings here

\usepackage[usenames, dvipsnames]{color}

%\usepackage{hyperref}      %to break long urls
%\def\UrlBreaks{\do\/\do-}  %ditto

\usepackage{bm}

\pagestyle{plain}

\usepackage{setspace}
\onehalfspacing
\raggedbottom

\usepackage{mathtools}
\usepackage{longtable}

\usepackage{booktabs}
\newcommand{\rowgroup}[1]{\hspace{-0.60em}#1} %% to create indents for variable headings

\usepackage{multirow}

\usepackage{siunitx}
\usepackage{dcolumn}

\usepackage{array, booktabs, ragged2e}

\usepackage{threeparttablex}
\usepackage{microtype}

\newcommand{\beginsupplement}{% complete program to generate appendix with tables
    \setcounter{table}{0}
    \renewcommand{\thetable}{A\arabic{table}}%
    \setcounter{figure}{0}
    \renewcommand{\thefigure}{A\arabic{figure}}%    
}


\begin{document}

{
{\renewcommand*{\arraystretch}{0.015}       %line spacing
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\begin{longtable}{l*{2}{D{.}{.}{-1}}}
\caption{Bivariate probit models for occupational injury and informal
 employment\label{tab1}}\\
\toprule\endfirsthead\midrule\endhead\midrule\endfoot\endlastfoot
                    &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}\\
                    &\multicolumn{1}{c}{Occupational injury}&\multicolumn{1}{c}{Informal employment}\\
\midrule
\rowgroup{Informal}            &     -0.123         &              \\
                    &     (-0.62)         &              \\
\rowgroup{Female}              &    -0.0497         &    -0.338         \\
                    &     (-0.33)         &     (-1.22)         \\
\rowgroup{\textit{Age (ref:15-24 years old)}}&                     &                                         \\                     
 25-34            &       0.126         &      0.611         \\
                    &      (0.50)         &      (1.47)         \\
35-44               &      0.151         &      0.262         \\
                    &      (0.57)         &      (0.64)         \\
45-54               &     0.0656         &      0.432         \\
                    &      (0.24)         &      (0.97)         \\
55-64               &     -0.471         &     0.108          \\
                    &     (-1.28)         &     (0.20)         \\
\rowgroup{\textit{Education (ref: Primary or below)}}&                     &                                          \\                    
Secondary           &     -0.553\sym{***} &     -0.559\sym{*} \\
                    &     (-3.47)         &     (-2.16)         \\
Tertiary            &     -0.606\sym{**} &     -1.564\sym{***} \\
                    &     (-2.97)         &     (-4.20)         \\
Earnings            &     -0.139\sym{*}  &     -0.568\sym{***}  \\
                    &     (-2.10)         &     (-5.02)         \\
\rowgroup{\textit{Sector (ref: Agriculture)}}&                     &                                         \\              
Mining              &     -0.278         &     -0.978         \\
                    &     (-0.64)         &     (-1.31)         \\
Manufacturing       &     -0.151         &     0.344         \\
                    &     (-0.37)         &     (0.45)         \\
Construction        &       0.174         &      0.295         \\
                    &      (0.46)         &      (0.42)         \\
Trade               &     -0.199         &     0.192         \\
                    &     (-0.46)         &     (0.27)         \\
Transport           &     -0.0454         &     0.812         \\
                    &     (-0.11)         &     (1.18)         \\
Other service activities&     -0.230         &     0.590         \\
                    &     (-0.67)         &     (0.95)         \\
\rowgroup{Occupation}          &      0.154         &      0.815\sym{**}         \\
                    &      (0.82)         &      (0.82)         \\
\rowgroup{\textit{Region (ref: Western Area)}}&                     &                                          \\                 
Eastern             &       0.336         &      0.323         \\
                    &        (1.87)       &      (1.06)         \\
Northern            &      0.511\sym{**}  &      0.671\sym{*}  \\
                    &      (2.90)         &      (1.99)         \\
Southern            &      0.209         &       0.0930         \\
                    &      (1.23)         &      (-0.62)         \\
\rowgroup{Union}               &      0.262         &      0.0918         \\
                    &      (1.92)         &      (0.30)         \\
\rowgroup{No. of household members informal}              &              &      3.318\sym{***}         \\
                                        &               &      (12.04)         \\
\rowgroup{Job search method}           &             &     0.737\sym{**}         \\
                            &             &     (3.13)         \\
\rowgroup{$\rho$}               &            &   0.0566           \\
                        &             &     (0.25)         \\                           
\midrule
\(N\)               &         979         &         979         \\
\bottomrule
\multicolumn{3}{l}{\footnotesize \textit{t} statistics in parentheses}\\
\multicolumn{3}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\
\end{longtable}
}

\end{document}

Which produces the following table

enter image description here

3
  • How about using \small? Oct 26, 2018 at 17:01
  • 2
    Some ideas to reduce that table: a) Remove the useless first row with "1" and "2" b) Use a \small font. c) Put the groupings rows as "Age" and "Education" in a first column with multirow cells, so that "Age" cell start in the same row that the "25-34 category. d) and, of course, make less complex models :-)
    – Fran
    Oct 26, 2018 at 17:08
  • 1
    If you remove \renewcommand*{\arraystretch}{0.015} which is causing the table rows to almost overlap and replace it with \singlespacing, you can see that your table actually takes up about 1.5 pages. I doubt you will be able to fit the whle table onto a single page unless you chose a quite small font size or do some redesigning, such as showing value and corresponding error in separate columns.
    – leandriis
    Mar 19, 2021 at 22:25

1 Answer 1

2

I would reorganize tale as follows:

\documentclass[a4paper,12pt]{article}
\usepackage{newtxtext,newtxmath}    % new
%\usepackage{bm}
%\usepackage{mathtools} % it load amsmath
%%\usepackage{amsmath}
\usepackage{microtype}
%\usepackage{apacite}
%\usepackage{graphicx}
\usepackage[skip=1ex]{caption}  %for setting table caption
\captionsetup[table]{font={small,stretch=0.80}} % caption settings here

%\usepackage[usenames, dvipsnames]{color}
\usepackage{setspace}
\onehalfspacing
\raggedbottom

\usepackage{booktabs, makecell, multirow} % added makecell
\NewExpandableDocumentCommand\mcc{O{1}m}{\multicolumn{#1}{c}{#2}} % new
\NewExpandableDocumentCommand\mcl{O{1}m}{\multicolumn{#1}{l}{#2}} % new
\usepackage[referable]{threeparttablex} % changed

\usepackage{siunitx}
\usepackage{dcolumn}

\usepackage{hyperref}      %to break long urls
%\def\UrlBreaks{\do\/\do-}  %ditto

\begin{document}
    \begin{table}[htbp]
    \centering
    \begin{threeparttable}
\caption{Bivariate probit models for occupational injury and informal
 employment}
\label{tab1}
    \begin{tabular}{>{\raggedright}m{11em}*{4}{D{.}{.}{-1}}}
    \toprule
    & \mcc[2]{\makecell{(1)\\Occupational\\ injury}}
            &  \mcc[2]{\makecell{(2)\\ Informal\\ employment}}  \\
    \midrule
Informal    & -0.123    & (-0.62)   &           &               \\
Female      & -0.0497   & (-0.33)   & -0.338    & (-1.22)       \\
    \addlinespace
\mcl[5]{\textit{Age (ref:15-24 years old)}}                     \\
25-34       &  0.126    &  (0.50)   &  0.611    &  (1.47)       \\
35-44       &  0.151    &  (0.57)   &  0.262    &  (0.64)       \\
45-54       &  0.0656   &  (0.24)   &  0.432    &  (0.97)       \\
55-64       & -0.471    & (-1.28)   &  0.108    &  (0.20)       \\
    \addlinespace
\mcl[5]{\textit{Education (ref: Primary or below)}}             \\
Secondary   & -0.553\tnote{***}
                        & (-3.47)   & -0.559\tnote{*} 
                                                & (-2.16)       \\
Tertiary    & -0.606\tnote{**} 
                        & (-2.97)   & -1.564\tnote{***}  
                                                & (-4.20)       \\
Earnings    & -0.139\tnote{*}  
                        & (-2.10)   &-0.568\tnote{***}   
                                                & (-5.02)       \\
    \addlinespace
\mcl[5]{\textit{Sector (ref: Agriculture)}}                     \\
Mining      & -0.278    & (-0.64)   & -0.978    & (-1.31)       \\
Manufacturing       
            & -0.151    & (-0.37)   &  0.344    &  (0.45)       \\
Construction        
            &  0.174    & (0.46)    &  0.295    &  (0.42)       \\
Trade       & -0.199    & (-0.46)   &  0.192    &  (0.27)       \\
Transport   & -0.0454   & (-0.11)   &  0.812    &  (1.18)       \\
Other service activities
            & -0.230    & (-0.67)   &  0.590    &  (0.95)       \\
Occupation  & 0.154 & (0.82)        &  0.815\tnote{**}        
                                                & (0.82)        \\
    \addlinespace
\mcl[5]{\textit{Region (ref: Western Area)}}                    \\
Eastern     &  0.336    &  (1.87)   &  0.323    &  (1.06)       \\
Northern    &  0.511\tnote{**}  
                        &  (2.90)   &  0.671\tnote{*}  
                                                & (1.99)        \\
Southern    &  0.209    &  (1.23)   &  0.0930   & (-0.62)       \\
Union       &  0.262    &  (1.92)   &  0.0918   &  (0.30)       \\
No. of household members informal
            &           &           &  3.318\tnote{***} 
                                                & (12.04)       \\
Job search method
            &           &           &  0.737\tnote{**}    
                                                & (3.13)        \\
$\rho$      &           &           &  0.0566   & (0.25)        \\
    \midrule
\(N\)       & \mcc{979} &           & \mcc{979} &               \\
    \bottomrule
    \end{tabular}
\begin{tablenotes}[flushleft, para]\footnotesize
\note{$t$ statistics in parentheses  

\item[*]    \(p<0.05\), 
\item[**]   \(p<0.01\), 
\item[***]  \(p<0.001\)}\\
\end{tablenotes}
    \end{threeparttable}
    \end{table}
\end{document}

enter image description here

Edit: or rather also use the S column types instead of D. In this case the table preamble is:

    \begin{table}[htbp]
    \centering
\sisetup{table-align-text-post=false,
         input-open-uncertainty = ,
         input-close-uncertainty = ,
         table-format=-1.4
         }

    \begin{threeparttable}
\caption{Bivariate probit models for occupational injury and informal
 employment}
\label{tab1}
    \begin{tabular}{@{} >{\raggedright}m{11em}
                    *{2}{S[table-format=-1.3,
                           table-space-text-post={$^{***}$}] 
                         S[table-format=-1.2,
                           table-space-text-pre={(},
                           table-align-text-pre=false,
                           table-space-text-post={)}]} @{}}

Table with above settings is:

enter image description here

You must log in to answer this question.

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