如果您能帮助创建这样的表格,我将不胜感激,这是我的代码和我想要的标题
\begin{table}
\caption{Descriptive statistics}
\label{tab1}
\centering
\begin{tabular}{@{} l *{2}{d{2.4}d{2.2}d{2.4}} @{}}
\toprule
Variables & \multicolumn{4}{c}{Domestic FIRMS} & \multicolumn{4}{c@{}}{Foreign FRIMS} \\
\cmidrule(l){2-4} \cmidrule(l){5-7}
\cmidrule(lr){2-3} \cmidrule{4-4} \cmidrule(lr){5-6} \cmidrule{7-7}
& \mc{Mean} & \mc{Max} & \mc{Min} & \mc{SD}&\mc{Mean} & \mc{Max} & \mc{Min} & \mc{SD}\\
\midrule
XLLs & 1.05 & 21 & 7.01 & 0.73 & 0.13 & 0.07& 0.07 & 0.07\\
Log Z_{PMD} & 10.7 & 12.1 & 6.98 & 0.77 & 0.16 & 0.1& 0.07& 0.07 \\
ESSAI Connections & 4.75 & 0 & 0 & 0.1 & 0 & 0& 0.07& 0.07 \\
Cep_{PF} & 4.75 & 0 & 0 & 0.1 & 0 & 0 & 0.07& 0.07\\
Ad_{ENd} & 4.75 & 0 & 0 & 0.1 & 0 & 0 & 0.07& 0.07\\
Size (LNYA) & 4.831 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Capitalization (DEY) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
liquidity (LRT) & 4.83& 1.07 & 4.67& 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Profitability (PYF) & 4.83& 1.07 & 4.67& 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Equality (ECD) & 4.83 & 1.07 & 4.6 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Leverage(LEV) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Loan growth (Ld) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Price growth (PG) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Diversification(DTV) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
MAS & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
PCS & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
\bottomrule
\end{tabular}
\end{table}
答案1
\documentclass{article}
\usepackage{dcolumn}
\usepackage{booktabs}
\usepackage{geometry}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\newcommand*\mc[1]{\multicolumn{1}{c}{#1}}
\begin{document}
\begin{table}
\caption{Descriptive statistics}
\label{tab1}
\centering
\begin{tabular}{ l d{-2.3} d{2.2} *{6}{d{1.2}} @{}}
\toprule
Variables & \multicolumn{4}{c}{Domestic FIRMS} & \multicolumn{4}{c}{Foreign FRIMS} \\
\cmidrule(l){2-5} \cmidrule(l){6-9}
& \mc{Mean} & \mc{Max} & \mc{Min} & \mc{SD}&\mc{Mean} & \mc{Max} & \mc{Min} & \mc{SD}\\
\midrule
\multicolumn{9}{@{}l}{Panel A: Risk measures}\\
\addlinespace
XLLs & 1.05 & 21 & 7.01 & 0.73 & 0.13 & 0.07& 0.07 & 0.07\\
Log Z\_{PMD} & 10.7 & 12.1 & 6.98 & 0.77 & 0.16 & 0.1& 0.07& 0.07 \\
\midrule
\multicolumn{9}{@{}l}{Panel B:......}\\
\addlinespace
ESSAI Connections & 4.75 & 0 & 0 & 0.1 & 0 & 0& 0.07& 0.07 \\
Cep{PF} & 4.75 & 0 & 0 & 0.1 & 0 & 0 & 0.07& 0.07\\
Ad\_{ENd} & 4.75 & 0 & 0 & 0.1 & 0 & 0 & 0.07& 0.07\\
\midrule
\multicolumn{9}{@{}l}{Panel C:......}\\
\addlinespace
Size (LNYA) & 4.831 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Capitalization (DEY) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
liquidity (LRT) & 4.83& 1.07 & 4.67& 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Profitability (PYF) & 4.83& 1.07 & 4.67& 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Equality (ECD) & 4.83 & 1.07 & 4.6 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Leverage(LEV) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Loan growth (Ld) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Price growth (PG) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
Diversification(DTV) & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
\midrule
\multicolumn{9}{@{}l}{Panel D:......}\\
\addlinespace
MAS & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
PCS & 4.83 & 1.07 & 4.67 & 0.79 & 0.2 & 0.73& 0.07& 0.07 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}