我有一张横向表格,有 18 列,行数少得多,带有表格注释,我试图将它放在两个横向页面上。我想“剪切”列,使其跨越两页(第一页 10 列,第二页 8 列),但保持“冻结”页面上的行。我尝试使用\longtable
代码,但它没有提供预期的结果。是否有代码等于\longtable
但在页面宽度侧跨页面(它在最后一页上写明它是上一页的延续)?我已在下面附上我目前使用的代码。非常感谢!
\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}
答案1
目前尚不完全清楚您想要什么,但这是一个适合一页且运行时不会出错的版本,它可能会帮助您(或其他发布答案的人)入门。似乎有太多数据无法放在一个表中。
\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}