帮助重新绘制此关联表以适合我的 pdf 页面并易于阅读

帮助重新绘制此关联表以适合我的 pdf 页面并易于阅读
%\begin{table}[htbp]
\small
  \centering
  \caption{Add caption}
      \begin{tabular}{|l|p{4.855em}|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|}
    \toprule
    \multicolumn{2}{|l|}{} & \multicolumn{1}{p{4.215em}|}{NIM (\%)} & \multicolumn{1}{p{4.215em}|}{GDP  (\%)} & \multicolumn{1}{p{4.215em}|}{ROE} & \multicolumn{1}{p{4.215em}|}{ROA} & \multicolumn{1}{p{4.215em}|}{INFLTN} & \multicolumn{1}{p{4.215em}|}{FDI} & \multicolumn{1}{p{4.215em}|}{BCBD (\%)} & \multicolumn{1}{p{4.215em}|}{DBACBA (\%)} & \multicolumn{1}{p{4.215em}|}{CBAGDP (\%)} & \multicolumn{1}{p{4.215em}|}{DBAGDP (\%)} & \multicolumn{1}{p{4.215em}|}{FDGDP (\%)} & \multicolumn{1}{p{4.215em}|}{LISTCO\_PC} & \multicolumn{1}{p{4.215em}|}{LL\_USD} & \multicolumn{1}{p{4.215em}|}{XREGME} & \multicolumn{1}{p{4.215em}|}{XREGCON} & \multicolumn{1}{p{4.215em}|}{OVERHEAD (\%)} & \multicolumn{1}{p{4.215em}|}{LLGDP (\%)} & \multicolumn{1}{p{4.215em}|}{STMKCAP (\%)} & \multicolumn{1}{p{4.215em}|}{STVALT\_D (\%)} & \multicolumn{1}{p{4.215em}|}{STTURN\_R (\%)} & \multicolumn{1}{p{4.215em}|}{NRBLOAN (\%)} \\
    \midrule
    \multicolumn{1}{|l|}{\multirow{21}[41]{*}{Pearson Correlation}} & NIM (\%) & 1.000 & .068  & .466  & .556  & .325  & -.030 & -.322 & -.418 & .304  & -.280 & -.329 & -.312 & -.081 & -.329 & .470  & .593  & -.386 & -.182 & -.114 & .102  & .016 \\
\cmidrule{2-2}          & GDP  (\%) & .068  & 1.000 & -.015 & .111  & .044  & -.089 & -.079 & .013  & -.036 & .006  & -.031 & .002  & .103  & -.240 & .329  & .143  & -.045 & -.454 & -.461 & .037  & -.234 \\
\cmidrule{2-2}          & ROE   & .466  & -.015 & 1.000 & .810  & .097  & .234  & -.162 & .139  & -.095 & -.067 & .058  & .064  & -.159 & .221  & -.068 & -.164 & .018  & .070  & .074  & -.026 & .087 \\
\cmidrule{2-2}          & ROA   & .556  & .111  & .810  & 1.000 & .246  & -.034 & -.153 & .034  & -.054 & -.048 & -.018 & -.058 & -.072 & .018  & .222  & -.014 & -.059 & -.044 & -.041 & -.053 & -.010 \\
\cmidrule{2-2}          & INFLTN & .325  & .044  & .097  & .246  & 1.000 & -.231 & -.146 & -.335 & .321  & -.065 & -.142 & -.115 & -.012 & -.292 & .308  & .048  & -.134 & -.081 & -.051 & .091  & -.072 \\
\cmidrule{2-2}          & FDI   & -.030 & -.089 & .234  & -.034 & -.231 & 1.000 & -.172 & -.049 & .131  & -.165 & .066  & .105  & -.169 & .315  & -.294 & .010  & -.021 & .271  & .259  & -.029 & -.069 \\
\cmidrule{2-2}          & BCBD (\%) & -.322 & -.079 & -.162 & -.153 & -.146 & -.172 & 1.000 & .375  & -.334 & .394  & .179  & .208  & .158  & .206  & -.522 & -.262 & .254  & .079  & .071  & .042  & .391 \\
\cmidrule{2-2}          & DBACBA (\%) & -.418 & .013  & .139  & .034  & -.335 & -.049 & .375  & 1.000 & -.884 & .364  & .453  & .298  & .318  & .268  & -.248 & -.569 & .440  & .105  & .083  & .150  & -.139 \\
\cmidrule{2-2}          & CBAGDP (\%) & .304  & -.036 & -.095 & -.054 & .321  & .131  & -.334 & -.884 & 1.000 & -.203 & -.266 & -.174 & -.238 & -.295 & .221  & .513  & -.269 & -.086 & -.069 & -.106 & .075 \\
\cmidrule{2-2}          & DBAGDP (\%) & -.280 & .006  & -.067 & -.048 & -.065 & -.165 & .394  & .364  & -.203 & 1.000 & .900  & .794  & .045  & -.218 & -.247 & -.393 & .929  & .087  & .030  & -.026 & .155 \\
\cmidrule{2-2}          & FDGDP (\%) & -.329 & -.031 & .058  & -.018 & -.142 & .066  & .179  & .453  & -.266 & .900  & 1.000 & .819  & -.039 & -.036 & -.270 & -.463 & .974  & .134  & .065  & -.022 & .040 \\
\cmidrule{2-2}          & LISTCO\_PC & -.312 & .002  & .064  & -.058 & -.115 & .105  & .208  & .298  & -.174 & .794  & .819  & 1.000 & -.074 & .105  & -.451 & -.419 & .806  & .121  & .064  & .015  & .042 \\
\cmidrule{2-2}          & LL\_USD & -.081 & .103  & -.159 & -.072 & -.012 & -.169 & .158  & .318  & -.238 & .045  & -.039 & -.074 & 1.000 & -.301 & .204  & -.108 & -.086 & -.034 & -.016 & .060  & -.303 \\
\cmidrule{2-2}          & XREGME & -.329 & -.240 & .221  & .018  & -.292 & .315  & .206  & .268  & -.295 & -.218 & -.036 & .105  & -.301 & 1.000 & -.706 & -.255 & -.018 & .177  & .151  & .034  & .220 \\
\cmidrule{2-2}          & XREGCON & .470  & .329  & -.068 & .222  & .308  & -.294 & -.522 & -.248 & .221  & -.247 & -.270 & -.451 & .204  & -.706 & 1.000 & .407  & -.342 & -.345 & -.308 & .013  & -.489 \\
\cmidrule{2-2}          & OVERHEAD (\%) & .593  & .143  & -.164 & -.014 & .048  & .010  & -.262 & -.569 & .513  & -.393 & -.463 & -.419 & -.108 & -.255 & .407  & 1.000 & -.495 & -.311 & -.254 & .125  & -.060 \\
\cmidrule{2-2}          & LLGDP (\%) & -.386 & -.045 & .018  & -.059 & -.134 & -.021 & .254  & .440  & -.269 & .929  & .974  & .806  & -.086 & -.018 & -.342 & -.495 & 1.000 & .110  & .035  & -.052 & .145 \\
\cmidrule{2-2}          & STMKCAP (\%) & -.182 & -.454 & .070  & -.044 & -.081 & .271  & .079  & .105  & -.086 & .087  & .134  & .121  & -.034 & .177  & -.345 & -.311 & .110  & 1.000 & .988  & -.023 & .162 \\
\cmidrule{2-2}          & STVALT\_D (\%) & -.114 & -.461 & .074  & -.041 & -.051 & .259  & .071  & .083  & -.069 & .030  & .065  & .064  & -.016 & .151  & -.308 & -.254 & .035  & .988  & 1.000 & .083  & .168 \\
\cmidrule{2-2}          & STTURN\_R (\%) & .102  & .037  & -.026 & -.053 & .091  & -.029 & .042  & .150  & -.106 & -.026 & -.022 & .015  & .060  & .034  & .013  & .125  & -.052 & -.023 & .083  & 1.000 & .051 \\
\cmidrule{2-2}          & NRBLOAN (\%) & .016  & -.234 & .087  & -.010 & -.072 & -.069 & .391  & -.139 & .075  & .155  & .040  & .042  & -.303 & .220  & -.489 & -.060 & .145  & .162  & .168  & .051  & 1.000 \\
    \end{tabular}%
  \label{tab:addlabel}%
%\end{table}%

答案1

让 21x21 的相关表看起来“不错”始终是一项严峻的艺术挑战。(另外:您有什么理由相信您的读者会关心完整的相关表吗?如果您只报告真正重要的 2 或 3 个相关性,他们会不会感觉一样好,甚至更好?)

一些建议:

  • 为了节省大量稀缺的水平空间,请省略整个第一列,并将字符串“Pearson Correlation”放置在 的参数中\caption

  • 加载sidewaystable包并将整个表封装在sidewaystable环境中。我相信你能猜出sidewaystable环境的作用。

  • 大大简化标题单元格。不要说明变量名称,只需将列编号为 (1)、(2) 等。没有足够的空间再次列出变量名称。毕竟,您已经在第一列中列出了变量名称。

  • 删除所有 23 条 [!] 垂直线(您会惊讶于 23 条线会占用多少空间)和 23 条水平线中的 20 条。加载包booktabs并使用\toprule\midrule\bottomrule绘制剩余的 3 条水平线。可选:\addlinespace在每 5 行后插入指令。

  • 使用tabular*环境并将其整体宽度设置为\textwidth

  • 对数据列使用数学模式,以确保-符号排版为数学减号符号,而不是文本模式的“破折号”符号

  • 即使进行了所有这些调整,您仍然需要将字体大小切换为\footnotesize或 甚至\scriptsize

在此处输入图片描述

\documentclass{article}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page size parameters appropriately
\usepackage{booktabs,rotating,array,caption}
\newcolumntype{R}{>{$}r<{$}} % right-aligned, math mode

\begin{document}
\begin{sidewaystable}
\captionsetup{skip=0.5\baselineskip,font=footnotesize}
\caption{Pearson Correlations} \label{tab:addlabel}
\footnotesize % or even "\scriptsize", if necessary

\setlength\extrarowheight{2pt} % optional; for a more open "look"

\setlength\tabcolsep{0pt} % make LaTeX figure out max. intercol. whitespace
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l *{21}{R} }
\toprule
&  (1) &  (2) &  (3) &  (4) &  (5) &  (6) &  (7) &  (8) &  (9) & (10)
& (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20) & (21) \\
\midrule
(1) NIM (\%) & 1.000 & .068  & .466  & .556  & .325  & -.030 & -.322 & -.418 & .304  & -.280 & -.329 & -.312 & -.081 & -.329 & .470  & .593  & -.386 & -.182 & -.114 & .102  & .016 \\
(2) GDP  (\%) & .068  & 1.000 & -.015 & .111  & .044  & -.089 & -.079 & .013  & -.036 & .006  & -.031 & .002  & .103  & -.240 & .329  & .143  & -.045 & -.454 & -.461 & .037  & -.234 \\
(3) ROE   & .466  & -.015 & 1.000 & .810  & .097  & .234  & -.162 & .139  & -.095 & -.067 & .058  & .064  & -.159 & .221  & -.068 & -.164 & .018  & .070  & .074  & -.026 & .087 \\
(4) ROA   & .556  & .111  & .810  & 1.000 & .246  & -.034 & -.153 & .034  & -.054 & -.048 & -.018 & -.058 & -.072 & .018  & .222  & -.014 & -.059 & -.044 & -.041 & -.053 & -.010 \\
(5) INFLTN & .325  & .044  & .097  & .246  & 1.000 & -.231 & -.146 & -.335 & .321  & -.065 & -.142 & -.115 & -.012 & -.292 & .308  & .048  & -.134 & -.081 & -.051 & .091  & -.072 \\
\addlinespace
(6) FDI   & -.030 & -.089 & .234  & -.034 & -.231 & 1.000 & -.172 & -.049 & .131  & -.165 & .066  & .105  & -.169 & .315  & -.294 & .010  & -.021 & .271  & .259  & -.029 & -.069 \\
(7) BCBD (\%) & -.322 & -.079 & -.162 & -.153 & -.146 & -.172 & 1.000 & .375  & -.334 & .394  & .179  & .208  & .158  & .206  & -.522 & -.262 & .254  & .079  & .071  & .042  & .391 \\
(8) DBACBA (\%) & -.418 & .013  & .139  & .034  & -.335 & -.049 & .375  & 1.000 & -.884 & .364  & .453  & .298  & .318  & .268  & -.248 & -.569 & .440  & .105  & .083  & .150  & -.139 \\
(9) CBAGDP (\%) & .304  & -.036 & -.095 & -.054 & .321  & .131  & -.334 & -.884 & 1.000 & -.203 & -.266 & -.174 & -.238 & -.295 & .221  & .513  & -.269 & -.086 & -.069 & -.106 & .075 \\
(10) DBAGDP (\%) & -.280 & .006  & -.067 & -.048 & -.065 & -.165 & .394  & .364  & -.203 & 1.000 & .900  & .794  & .045  & -.218 & -.247 & -.393 & .929  & .087  & .030  & -.026 & .155 \\
\addlinespace
(11) FDGDP (\%) & -.329 & -.031 & .058  & -.018 & -.142 & .066  & .179  & .453  & -.266 & .900  & 1.000 & .819  & -.039 & -.036 & -.270 & -.463 & .974  & .134  & .065  & -.022 & .040 \\
(12) LISTCO\_PC & -.312 & .002  & .064  & -.058 & -.115 & .105  & .208  & .298  & -.174 & .794  & .819  & 1.000 & -.074 & .105  & -.451 & -.419 & .806  & .121  & .064  & .015  & .042 \\
(13) LL\_USD & -.081 & .103  & -.159 & -.072 & -.012 & -.169 & .158  & .318  & -.238 & .045  & -.039 & -.074 & 1.000 & -.301 & .204  & -.108 & -.086 & -.034 & -.016 & .060  & -.303 \\
(14) XREGME & -.329 & -.240 & .221  & .018  & -.292 & .315  & .206  & .268  & -.295 & -.218 & -.036 & .105  & -.301 & 1.000 & -.706 & -.255 & -.018 & .177  & .151  & .034  & .220 \\
(15) XREGCON & .470  & .329  & -.068 & .222  & .308  & -.294 & -.522 & -.248 & .221  & -.247 & -.270 & -.451 & .204  & -.706 & 1.000 & .407  & -.342 & -.345 & -.308 & .013  & -.489 \\
\addlinespace
(16) OVERHEAD (\%) & .593  & .143  & -.164 & -.014 & .048  & .010  & -.262 & -.569 & .513  & -.393 & -.463 & -.419 & -.108 & -.255 & .407  & 1.000 & -.495 & -.311 & -.254 & .125  & -.060 \\
(17) LLGDP (\%) & -.386 & -.045 & .018  & -.059 & -.134 & -.021 & .254  & .440  & -.269 & .929  & .974  & .806  & -.086 & -.018 & -.342 & -.495 & 1.000 & .110  & .035  & -.052 & .145 \\
(18) STMKCAP (\%) & -.182 & -.454 & .070  & -.044 & -.081 & .271  & .079  & .105  & -.086 & .087  & .134  & .121  & -.034 & .177  & -.345 & -.311 & .110  & 1.000 & .988  & -.023 & .162 \\
(19) STVALT\_D (\%) & -.114 & -.461 & .074  & -.041 & -.051 & .259  & .071  & .083  & -.069 & .030  & .065  & .064  & -.016 & .151  & -.308 & -.254 & .035  & .988  & 1.000 & .083  & .168 \\
(20) STTURN\_R (\%) & .102  & .037  & -.026 & -.053 & .091  & -.029 & .042  & .150  & -.106 & -.026 & -.022 & .015  & .060  & .034  & .013  & .125  & -.052 & -.023 & .083  & 1.000 & .051 \\
(21) NRBLOAN (\%) & .016  & -.234 & .087  & -.010 & -.072 & -.069 & .391  & -.139 & .075  & .155  & .040  & .042  & -.303 & .220  & -.489 & -.060 & .145  & .162  & .168  & .051  & 1.000 \\
\bottomrule
\end{tabular*}
\end{sidewaystable}
\end{document} 

相关内容