2

I have a landscape table with 18 columns and number of rows that are much less with table notes that I try to fit across two landscape pages. I would like to "cut" the columns so that it goes over two pages (10 columns on the first page and 8 columns on the second page) but keep "freeze" the rows over the pages. I have tried with \longtable code but it does not deliver the anticipated result. Is there a code equal to \longtable but that breaks across pages on the width side of the page, (it writes on the last page that its the table continued from previous page)? I have attached the codes that I am currently using here below. Many thanks!

\begin{landscape}\label{App:test of balence}

\section{Appendix}\label{App1}
\begin{threeparttable}[htbp]
\setlength{\tabcolsep}{4pt}
  \begin{center}
  \begin{scriptsize}
  \caption{\small Test of balance in baseline characteristics: Ordinary least squares regressions – Push-button replication}
    \begin{tabularx}{1.6\textwidth}{lccccccccccccccccc}
    \toprule
        & Female 
        & Married 
        & Age 
        & Years
        & Household  
        & Asset 
        & Livestock  
        & Land under  
        & Proceeds from  
        & Cash spent
        & Has bank account 
        & Savings 
        & Hyperbolic 
        & Patient now, 
        & Net transfers  
        & Missing value: 
        & Missing value: \\

        &     
        &    
        &  (year)     
        &  of education   
        &  size  
        &  index    
        &  index 
        &  cultivation (acres)   
        &  crop sales (MK)   
        &  on inputs (MK)    
        &     
        &  in accounts and cash (MK)    
        &     
        &  impatient later  
        &  made in past 12 months (MK)  
        &  Formal savings and cash   
        &  Time pre-ference \\

    \midrule



   \textbf{Panel A} &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\

    Any treatment & 0.044*** & -0,018** & -1.42 & 0.14 & -0.03 & 0.08 & -0.07 & -0.01 & 6,997 &  3,918* & -0.021 & 371 & 0.012 & -0.054 & 72  & -0.002 & 0.001 \\
        & -0.012 & -0.009 & -0.93 & -0.2 & -0.13 & -0.11 & -0.09 & -0.14 & (8,891) & (2,027) & -0.029 & -550 & -0.017 & -0.034 & -452 & -0.013 & -0.005 \\
    p-values of F-test for  &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\

joint significance of baseline variables^{i}   &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
      &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\


    \textbf{Panel B} &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
    Ordinary treatment & 0.042*** & -0.018* & -1.45 & 0.19 & -0.02 & 0.09 & -0.07 & 0.02 & 8,294 & 4,459** & -0.005 & 367 & 0   & -0.034 & 320 & 0   & 0 \\
        & -0.013 & -0.01 & -0.98 & -0.22 & -0.13 & -0.12 & -0.09 & -0.15 & (9,639) & (2,209) & -0.031 & -588 & -0.018 & -0.037 & -475 & -0.015 & -0.005 \\
    Commitment treatment & 0.045*** & -0.019* & -1.39 & 0.09 & -0.04 & 0.07 & -0.06 & -0.05 & 5,604 & 3,337 & -0.039 & 376 & 0.024 & -0.076** & -195 & -0.004 & 0.003 \\
        & (0,013) & -0.01 & -0.97 & -0.22 & -0.13 & -0.12 & -0.09 & -0.15 & (9,779) & (2,357) & -0.032 & -612 & -0.019 & -0.036 & -476 & -0.014 & -0.005 \\
    p-values of F-test: Coefficients on  & 0.79 & 0.912 & 0.924 & 0.557 & 0.857 & 0.825 & 0.936 & 0.549 & 0.731 & 0.592 & 0.219 & 0.985 & 0.083 & 0.11 & 0.094 & 0.73 & 0.661 \\
ordinary and commitment treatments are equal  &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\    

    p-values of F-test for joint significance of baseline variables &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
joint significance of baseline variables &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\    
    Commitment savings &     &     &     &     & 0.6168 &     &     &     &     &     &     &     &     &     &     &     &  \\
    Ordinary savings &     &     &     &     & 0.8851 &     &     &     &     &     &     &     &     &     &     &     &  \\
    Mean dependent variable in control group^{ii} &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
    Number of observations & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 \\

     \end{tabularx}
     \hline
    \hline
    \begin{tablenotes}
   \medskip
   \begin{center}
     *, **, and *** denote significance at the 10\%, 5\%, and 1\% levels, respectively.
     \end{centre}
     \footnotesize
   Note: The results reported in this table were produced by the Stata code provided by the authors of the original study and are completely consistent with Table 3 on p. 201 of their published paper, except for the following minor differences: i The original authors’ code did not provide for this test to be carried out. When we carried out this test as part of our pure replication, our results (see Table 3) were in line with those reported in the original authors’ table. ii The original authors’ code did not provide any values for the mean dependent variable in the control group. When we calculated these values ourselves as part of our pure replication, this produced the same results (see Table 3) as those reported in the original authors’ table. 
   \end{tablenotes}
       \bottomrule
      \end{threeparttable}
\end{scriptsize}
\end{center}
\end{landscape}
  • Could you add a compilable MWE? – Raaja Aug 3 '18 at 7:31
  • sorry but what is MWE? – Thashy Aug 3 '18 at 7:53
  • 1
    (i) mwe: minimal working example -- a complete small document with your table which we can compile without adding anything to your code snippet (ii) the simplest way to solve your problem is manually split your table into two parts (firs n/2 columns, second n/2 columns) and insert each part separately with use \ContinuedFloat from captionpackage – Zarko Aug 3 '18 at 7:59
  • 1
    Welcome to TeX SX! Did you consider swapping rows and columns? I think it would be simpler to code. – Bernard Aug 3 '18 at 8:07
1

It's not entirely clear what you want but this is a version that fits on a page and runs without error which may get you (or other people posting answers) started. there seems far too much data to put in a single table.

enter image description here

\documentclass[11pt, a4paper]{article}
\usepackage[utf8]{inputenc}


\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\usepackage{pdflscape}
\usepackage{longtable,array,booktabs}

\newcommand\hd[1]{\multicolumn{1}{c}{\fontseries{b}\selectfont\begin{tabular}[t]{@{}c@{}}#1\end{tabular}}}

\begin{document}
  \begin{landscape}

\tiny
\setlength\tabcolsep{2pt}

 \begin{longtable}{>{\raggedright}p{3cm}ccccccccccccccccc}
  \caption{Test of balance in baseline characteristics: Ordinary least squares regressions – Push-button replication}\\
       \toprule
        & Female 
        & Married 
        & \hd{Age\\ (year)}
        & \hd{Years\\ of education   }
        & \hd{Household  \\size  }
        & \hd{Asset \\ index}
        & \hd{Livestock\\ index}  
        & \hd{Land under  \\ cultivation\\ (acres)}
        & \hd{Proceeds\\ from\\ crop sales\\ (MK)   }
        & \hd{Cash spent\\on inputs\\ (MK) }   
        & \hd{Has bank\\ account }
        & \hd{Savings\\ in accounts\\ and cash\\ (MK)}    
        & \hd{Hyperbolic} 
        & \hd{Patient now\\impatient\\ later}  
        & \hd{Net transfers\\ made in\\ past\\ 12 months\\ (MK)} 
        & \hd{Missing value:\\ Formal savings\\ and cash}   
        & \hd{Missing value: \\Time\\preference} \\

    \midrule



   \textbf{Panel A} &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\

    Any treatment & 0.044*** & -0,018** & -1.42 & 0.14 & -0.03 & 0.08 & -0.07 & -0.01 & 6,997 &  3,918* & -0.021 & 371 & 0.012 & -0.054 & 72  & -0.002 & 0.001 \\
        & -0.012 & -0.009 & -0.93 & -0.2 & -0.13 & -0.11 & -0.09 & -0.14 & (8,891) & (2,027) & -0.029 & -550 & -0.017 & -0.034 & -452 & -0.013 & -0.005 \\
    p-values of F-test for  &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\

joint significance of baseline variables\textsuperscript{i}   &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
      &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\


    \textbf{Panel B} &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
    Ordinary treatment & 0.042*** & -0.018* & -1.45 & 0.19 & -0.02 & 0.09 & -0.07 & 0.02 & 8,294 & 4,459** & -0.005 & 367 & 0   & -0.034 & 320 & 0   & 0 \\
        & -0.013 & -0.01 & -0.98 & -0.22 & -0.13 & -0.12 & -0.09 & -0.15 & (9,639) & (2,209) & -0.031 & -588 & -0.018 & -0.037 & -475 & -0.015 & -0.005 \\
    Commitment treatment & 0.045*** & -0.019* & -1.39 & 0.09 & -0.04 & 0.07 & -0.06 & -0.05 & 5,604 & 3,337 & -0.039 & 376 & 0.024 & -0.076** & -195 & -0.004 & 0.003 \\
        & (0,013) & -0.01 & -0.97 & -0.22 & -0.13 & -0.12 & -0.09 & -0.15 & (9,779) & (2,357) & -0.032 & -612 & -0.019 & -0.036 & -476 & -0.014 & -0.005 \\
    p-values of F-test: Coefficients on  & 0.79 & 0.912 & 0.924 & 0.557 & 0.857 & 0.825 & 0.936 & 0.549 & 0.731 & 0.592 & 0.219 & 0.985 & 0.083 & 0.11 & 0.094 & 0.73 & 0.661 \\
ordinary and commitment treatments are equal  &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\    

    p-values of F-test for joint significance of baseline variables &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
joint significance of baseline variables &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\    
    Commitment savings &     &     &     &     & 0.6168 &     &     &     &     &     &     &     &     &     &     &     &  \\
    Ordinary savings &     &     &     &     & 0.8851 &     &     &     &     &     &     &     &     &     &     &     &  \\
    Mean dependent variable in control group\textsuperscript{ii} &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &     &  \\
    Number of observations & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 & 3,150 \\

 \end{longtable}


   \medskip
   \begin{center}
     *, **, and *** denote significance at the 10\%, 5\%, and 1\% levels, respectively.
     \end{center}

     \footnotesize
   Note: The results reported in this table were produced by the Stata code provided by the authors of the original study and are completely consistent with Table 3 on p. 201 of their published paper, except for the following minor differences: i The original authors’ code did not provide for this test to be carried out. When we carried out this test as part of our pure replication, our results (see Table 3) were in line with those reported in the original authors’ table. ii The original authors’ code did not provide any values for the mean dependent variable in the control group. When we calculated these values ourselves as part of our pure replication, this produced the same results (see Table 3) as those reported in the original authors’ table. 


\end{landscape}

\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.