我如何获得与此类似的表格布局?

我如何获得与此类似的表格布局?

我正尝试以类似于所附屏幕截图的方式报告我的估计结果。

有人能帮我如何在 LaTeX 中做到这一点吗?

非常感激在此处输入图片描述

答案1

使用@leandriis 代码更新:

像这样?我把它留给你作为练习来改进标题布局。我使用了软件包数学大批书签希尼奇骨髓。我的建议是至少阅读booktabs和的文档array

可以改进表格,但我没有更多时间了。对齐数字时遇到了一些挑战,正如您所看到的,倒数第二个单元格中的括号并不完美(2010-05-20。现在间距已正确实现 @leandriis 的提示。)

\documentclass[10pt]{scrartcl}
\usepackage{amsmath, array, booktabs, siunitx, bm}

\setlength\extrarowheight{2pt}
\newcolumntype{F}{>{$}p{0.75cm}<{$}}

\sisetup{
table-figures-integer = 1,
table-figures-decimal = 3,
table-space-text-pre = (,
table-space-text-post = \textsuperscript{**}}

\begin{document}

\begin{table}
\caption{\bfseries Estimate on the regime-switching \bigskip}
\label{tab:regime-switching}

\begin{tabular}{@{}F*{6}{S[table-text-alignment= left, table-number-alignment = left, table-align-text-pre = true, table-align-text-post = true]}@{}}

\toprule
\rule{0.75cm}{0pt}
&\multicolumn{5}{c}{\bfseries Panel A: NS1-RS estimation results}
&\rule{0.75cm}{0pt}\\ % ‘invisible’ rule used to give the last column some width
\cmidrule(l){2-6}

%first cell
&\multicolumn{3}{c}{\bm{$\hat{F}$}}
&\multicolumn{2}{c}{\bm{$\tilde{\mu}_{S_t}$}}
&\\
\cmidrule(lr){2-4}\cmidrule(lr){5-6}

%first cell
&\multicolumn{1}{l}{$\beta _{1,t-1}$}
&\multicolumn{1}{l}{$\beta _{2,t-1}$}
&\multicolumn{1}{l}{$\beta _{3,t-1}$}
&\multicolumn{1}{l}{$S_1 = 1$}
&\multicolumn{1}{l}{$S_t = 2$}
&\\[1ex]

\beta _{1,t}
&0.992{\textsuperscript{**}}
&0
&0
&0.047
&
&\\

%first cell
&{(}0.004{)}
&
&
&0.032
&
&\\

\beta _{2,t}
&0
&0
&0
&-3.295{\textsuperscript{**}}
&-2.205{\textsuperscript{**}}
&\\

%first cell
&
&
&
&{(}0.086{)}
&{(}0.037{)}
&\\

\beta _{3,t}
&0
&0
&0.901{\textsuperscript{**}}
&-0.071{\textsuperscript{**}}
&{\kern0.4em-}
&\\

%first cell
&
&
&{(}0.017{)}
&{(}0.029{)}
&
&\\

\beta _{4,t}
&{\kern0.4em-}
&{\kern0.4em-}
&{\kern0.4em-}
&{\kern0.4em-}
&{\kern0.4em-}
&\\[1ex]

%first cell
&\multicolumn{3}{c}{\bm{$\hat{Q}$}}
&\multicolumn{2}{c}{\bm{$\hat{P}$}}
&\\
\cmidrule(lr){2-4}\cmidrule(lr){5-6}

%first cell
&\multicolumn{1}{l}{$\beta _{1,t}$}
&\multicolumn{1}{l}{$\beta _{2,t}$}
&\multicolumn{1}{l}{$\beta _{3,t}$}
&\multicolumn{1}{l}{$\rho _{11}$}
&\multicolumn{1}{l}{$\rho _{22}$}
&\\[1ex]

\beta _{1,t}
&0.093
&{\kern0.4em-}
&{\kern0.4em-}
&0.977{\textsuperscript{**}}
&0.981{\textsuperscript{**}}
&\\

\beta _{2,t}
&0
&1.297
&
&{(}0.009{)}
&{(}0.007{)}
&\\

\beta _{3,t}
&0
&
&0.661
&\multicolumn{2}{c}{\bm{$\hat{\lambda}$}}
&\rule{0pt}{3ex}\\
\cmidrule(lr){5-6}

\beta _{4,t}
&{\kern0.4em-}
&{\kern0.4em-}
&{\kern0.4em-}
&\multicolumn{2}{S[table-format=1.4,table-align-text-pre=false,table-align-text-post=false]}{0.0571{\textsuperscript{**}}}
&\\

%first cell
&
&
&
&\multicolumn{2}{S[table-format=1.4,table-align-text-pre=false,table-align-text-post=false]}{{(}0.001{)}}
&\\

\bottomrule

\end{tabular}

\end{table}

\end{document}

在此处输入图片描述

相关内容