如何更正我的乳胶代码以复制表格?

问题描述 投票:0回答:0

我下面的代码是一个 .tex 代码,应该在 Overleaf 中工作但不起作用。我相信这是因为我如何编写 begin tabular 命令。但是,我无法纠正。请更正它,让我知道我的错误是什么。结果应该与所附图像相似。谢谢。

\documentclass{standalone}
\usepackage{booktabs}
\usepackage{array}
%\usepackage{multirow}

\begin{document}

{\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}      \begin{tabular}{l*{9}{>{\centering \arraybackslash}m{3cm}}@{}} \toprule       \addlinespace[3mm]        & \multirow{7}{2cm}{Asset Index} & \multirow{7}{2cm}{Per-capita Consumption} & \multirow{7}{2cm}{Food Security Index} & \multirow{7}{2cm}{Income and Revenues} & \multirow{7}{2cm}{Financial Inclusion Index} & \multirow{7}{2cm}{Physical Health Index} & \multirow{7}{2cm}{Mental Health Index} & \multirow{7}{2cm}{Productive time use} \\       \addlinespace[30mm]
                    &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)}&\multicolumn{1}{c}{(4)}&\multicolumn{1}{c}{(5)}&\multicolumn{1}{c}{(6)}&\multicolumn{1}{c}{(7)}&\multicolumn{1}{c}{(8)}\\
\hline \\       & \multicolumn{8}{c}{\textit{Panel A: Endline 1 (18 months)}} \\       \addlinespace[1mm] \\
Treatment           &       0.217&       0.311&       0.184&       0.145&      -0.004&       0.061&       0.115&       0.285\\
                    &     (0.111)&     (0.076)&     (0.048)&     (0.075)&     (0.042)&     (0.028)&     (0.029)&     (0.049)\\
[1em]
q-value             &       0.041&       0.001&       0.001&       0.041&       0.262&       0.028&       0.001&       0.001\\
Control Mean        &       -0.20&        0.35&        0.35&        0.00&        0.14&        0.12&        0.32&        0.23\\
Baseline Mean       &       -0.00&       -0.00&       -0.00&           .&       -0.00&       -0.00&       -0.00&       -0.00\\
Observations        &         679&         813&         812&         814&         812&       1,504&       1,502&       1,504\\
\addlinespace[1mm] \\ & \multicolumn{8}{c}{\textit{Panel B: Endline 2 (3 years)}} \\
[1em]
Treatment           &       0.389&       0.292&       0.251&       0.172&       0.192&       0.027&       0.012&       0.102\\
                    &     (0.103)&     (0.079)&     (0.059)&     (0.071)&     (0.062)&     (0.027)&     (0.037)&     (0.044)\\
[1em]
q-value             &       0.001&       0.001&       0.001&       0.015&       0.003&       0.160&       0.334&       0.018\\
Control Mean        &       -0.25&        0.85&        0.94&       -0.00&        0.30&        0.21&        0.75&        0.28\\
Baseline Mean       &       -0.00&       -0.00&       -0.00&           .&       -0.00&       -0.00&       -0.00&       -0.00\\
Observations        &         875&         875&         875&         875&         875&       1,757&       1,757&       1,756\\
\addlinespace[1mm] \\ & \multicolumn{8}{c}{\textit{Panel C: Endline 3 (7 years)}} \\
[1em]
Treatment           &       0.814&       0.717&       0.431&       0.334&       0.181&       0.130&       0.249&       0.165\\
                    &     (0.132)&     (0.125)&     (0.062)&     (0.070)&     (0.135)&     (0.031)&     (0.042)&     (0.044)\\
[1em]
q-value             &       0.001&       0.001&       0.001&       0.001&       0.047&       0.001&       0.001&       0.001\\
Control Mean        &       -0.46&        1.09&        1.09&        0.00&        0.67&        0.57&        1.09&       -0.04\\
Baseline Mean       &       -0.00&       -0.00&       -0.00&           .&       -0.00&       -0.00&       -0.00&       -0.00\\
Observations        &         807&         867&         867&         869&         867&       1,906&       1,900&       1,915\\
\addlinespace[1mm] \\ & \multicolumn{8}{c}{\textit{Panel D: Endline 4 (10 years)}} \\
[1em]
Treatment           &       0.346&       0.579&       0.127&       0.264&       0.121&       0.187&       0.203&       0.148\\
                    &     (0.121)&     (0.175)&     (0.063)&     (0.080)&     (0.152)&     (0.040)&     (0.044)&     (0.052)\\
[1em]
q-value             &       0.005&       0.002&       0.020&       0.002&       0.105&       0.001&       0.001&       0.005\\
Control Mean        &       -0.26&        1.61&        1.21&        0.00&        1.08&        0.12&        0.76&       -0.02\\
Baseline Mean       &       -0.00&       -0.00&       -0.00&           .&       -0.00&       -0.00&       -0.00&       -0.00\\
Observations        &         885&         880&         885&         885&         885&       1,229&       1,229&       1,229\\
\hline \hline \\
\endtabular

\end{document}

latex overleaf
© www.soinside.com 2019 - 2024. All rights reserved.