\begin{tabular}{p{2cm} p{2cm} p{2cm} p{2cm} p{2cm}}
\hline
& \multicolumn{2}{c}{Latin America}& \multicolumn{2}{c}{ Africa}\\
\hline
& {\large $\Delta p_c$} & {\large $\Delta p_o$} & {\large $\Delta p_c$} & {\large $\Delta p_o$}\\
\hline
{\large $\Delta p_{c-1}$} &–1.191*** & 0.361*** & –1.07*** & 0.382** \\
& (0.153) & (0.153) & (0.16) & (0.196) \\
{\large$\Delta p_{o-1}$} & –0.084 & –0.084 & 0.120 & 0.283*\\
& (0.149) & (0.149) &(0.215) & (0.155)\\
$c$ & –0.001 & 0.005 & 0.001 & 0.003\\
& (0.025) & (0.025) & (0.029) & (0.035)\\
$\alpha $& 0.073 & –0.580*** & 0.150 & –0.497***\\
& (0.323) & (0.172) & (0.236) & (0.197)\\
\hline
\end{tabular}
\begin{tabular}{p{2.5cm}| p{1cm} p{1cm} p{1cm} p{1cm} p{1cm} p{1cm} p{1cm}}
\multicolumn{7}{l}{Test results}\\
\hline
$R^2$ &0.428 & & 0.174 & & 0.428 & & 0.174 \\
\textit{F-statistic} & 6.988** & & 3.181* & & 6.988** & & 3.181*\\
\textit{Log Likelihood} & & 30.87 & & & & 16.57 &\\
\multirow{2}{*}{\textit{LM-Test (p-values) for autocorrelation, lag 1}} & & & & & & &\\
& (0.323) & (0.172) & (0.236) & (0.197) & \\
& (0.025) & (0.025) & (0.029) & (0.035) &\\
\hline
\end{tabular}
请帮我解决这个问题……最后一行根本不起作用。
答案1
给你。我想这就是表格的意图。我完全改变了布局,因为我发现原来的表格在视觉上不太吸引人。希望你会喜欢它。
一些评论:
- 它看起来像一张桌子,而不是两张,所以我把它做成了一张桌子。
- 请不要
\large
不当使用,表格中没有必要使用它。 \multirow
被高估了,我认为它没用。- 注意使用 来
\cmidrule(lr)
分隔两对列。 - 为了很好地按小数点对齐数字,我使用了
r@{.}l
列构造并将所有内容替换.
为&
。我本来会使用S[table-format=0.3]
列siunitx
,但它不支持开箱即用的带括号的数字。
\documentclass{article}
\usepackage{array,booktabs}
\providecommand\Midrule{\midrule[\heavyrulewidth]}
\begin{document}
\begin{tabular}{l*{4}{>$r<$@{.}>$l<$}}
\toprule
& \multicolumn{4}{c}{\bfseries Latin America}& \multicolumn{4}{c}{\bfseries Africa}\\
\cmidrule(lr){2-5}
\cmidrule(lr){6-9}
& \multicolumn{2}{c}{$\Delta p_c$} & \multicolumn{2}{c}{$\Delta p_o$}
& \multicolumn{2}{c}{$\Delta p_c$} & \multicolumn{2}{c}{$\Delta p_o$}\\
\Midrule
$\Delta p_{c-1}$ &-1&191^{***} & 0&361^{***} & -1&07^{***} & 0&382^{**} \\
& (0&153) & (0&153) & (0&16) & (0&196) \\
\midrule
$\Delta p_{o-1}$ & -0&084 & -0&084 & 0&120 & 0&283^{*}\\
& (0&149) & (0&149) &(0&215) & (0&155)\\
\midrule
$c$ & -0&001 & 0&005 & 0&001 & 0&003\\
& (0&025) & (0&025) & (0&029) & (0&035)\\
\midrule
$\alpha $& 0&073 & -0&580^{***} & 0&150 & -0&497^{***}\\
& (0&323) & (0&172) & (0&236) & (0&197)\\
\Midrule
\multicolumn{9}{c}{\bfseries Test results}\\
\Midrule
$R^2$ &0&428 & 0&174 & 0&428 & 0&174 \\
\midrule
$F$-statistic & 6&988^{**} & 3&181^{*} & 6&988^{**} & 3&181^{*}\\
\midrule
$\log$ likelihood & \multicolumn{4}{c}{30.87} & \multicolumn{4}{c}{16.57}\\
\midrule
LM-Test ($p$-values) for
& (0&323) & (0&172) & (0&236) & (0&197) \\
autocorrelation, lag 1
& (0&025) & (0&025) & (0&029) & (0&035) \\
\bottomrule
\end{tabular}
\end{document}
答案2
几乎像@tohecz,但是带有siunitx
包:
\documentclass{article}
\usepackage{array,booktabs}
\usepackage{mathtools}
\providecommand\Midrule{\midrule[\heavyrulewidth]}
\usepackage{siunitx}
\begin{document}
\sisetup{table-format=1.3, table-space-text-pre=(, table-space-text-post =\textsuperscript{***}}
\begin{tabular}{l*{4}{S[}}
\toprule
& \multicolumn{2}{c}{\bfseries Latin America}& \multicolumn{2}{c}{\bfseries Africa}\\
\cmidrule(lr){2-3}
\cmidrule(lr){4-5}
& {$\Delta p_c$} & {$\Delta p_o$} &{$\Delta p_c$} & {$\Delta p_o$}\\
\Midrule
$\Delta p_{c-1}$ &-1.191\textsuperscript{***} & 0.361\textsuperscript{***} & -1.07\textsuperscript{\hskip -0.5em{***}} & 0.382\textsuperscript{**} \\
& {(}0.153{)} &{(}0.153{)} & {(}0.16{\hskip -0.5em)} &{(}0.196{)} \\
\cmidrule(lr){1-5}
$\Delta p_{o-1}$ & -0.084 & -0.084 & 0.120 & 0.283\textsuperscript{*}\\
& {(}0.149{)} & {(}0.149{)} &{(}0.215{)} & {(}0.155{)}\\
\cmidrule(lr){1-5}
$c$ & -0.001 & 0.005 & 0.001 & 0.003\\
& {(}0.025{)} & {(}0.025{)} & {(}0.029{)} & {(}0.035{)}\\
\cmidrule(lr){1-5}
$\alpha $& 0.073 & -0.580\textsuperscript{***} & 0.150 & -0.497\textsuperscript{***}\\
& {(}0.323{)} & {(}0.172{)} & {(}0.236{)} & {(}0.197{)}\\
\Midrule
\addlinespace[3ex]
\multicolumn{5}{c}{\bfseries Test results}\\
\Midrule
$R^2$ &0.428 & 0.174 & 0.428 & 0.174 \\
\cmidrule(lr){1-5}
$F$-statistic & 6.988\textsuperscript{**} & 3.181\textsuperscript{*} & 6.988\textsuperscript{**} & 3.181\textsuperscript{*}\\
\cmidrule(lr){1-5}
$\log$ likelihood & \multicolumn{2}{c}{30.87} & \multicolumn{2}{c}{16.57}\\
\cmidrule(lr){1-5}
LM-Test ($p$-values) for
& {(}0.323{)} & {(}0.172{)} & {(}0.236{)} & {(}0.197{)} \\
autocorrelation, lag 1
& {(}0.025{)} & {(}0.025{)} & {(}0.029{)} & {(}0.035{)} \\
\bottomrule
\end{tabular}
\end{document}