如何调整回归表中的标准误差(长文本破坏格式)?

如何调整回归表中的标准误差(长文本破坏格式)?

当我使用 tabulary 对回归表进行居中和格式化时,表格上的文本会导致标准误差远低于系数。我不知道如何调整。我尝试过使用不同的格式,如 longtable、table 和 tabulary。

\documentclass[]{article}
\usepackage{tabulary}
\usepackage{booktabs}
\setlength{\pdfpagewidth}{8.5in} \setlength{\pdfpageheight}{11in}
\begin{document}
\centering
\begin{tabulary}{\linewidth}{LCCCCC} \toprule
 & (1) & (2) & (3) \\
VARIABLES & Contraceptive usage & children ideally & AIDS Awareness \\ \hline
 &  &  &  \\
own\_tv & 0.07*** & -0.21*** & 0.17*** \\
 & (0.01) & (0.02) & (0.01) \\
Age & 0.07*** & 0.01 & 0.01*** \\
 & (0.00) & (0.01) & (0.00) \\
Newspaper regular Women = 2, Sometimes 2 & 0.04*** & 0.01 & 0.08*** \\
 & (0.01) & (0.03) & (0.01) \\
Newspaper regular Women = 3, Regularly 3 & -0.04** & -0.01 & 0.07*** \\
 & (0.02) & (0.03) & (0.01) \\
Radio regular Women = 2, Sometimes 2 & -0.04*** & 0.07*** & -0.02** \\
 & (0.01) & (0.02) & (0.01) \\
Radio regular Women = 3, Regularly 3 & -0.09*** & 0.09*** & -0.01 \\
 & (0.02) & (0.03) & (0.01) \\
Constant & -0.77*** & 1.95*** & 0.11** \\
 & (0.06) & (0.11) & (0.05) \\
 &  &  &  \\
Observations & 30,329 & 31,295 & 33,112 \\
 R-squared & 0.086 & 0.127 & 0.271 \\ \hline
\multicolumn{4}{c}{ Robust standard errors in parentheses} \\
\multicolumn{4}{c}{ *** p$<$0.01, ** p$<$0.05, * p$<$0.1} \\
\end{tabulary}
\end{document}

答案1

我建议您切换到一个tabularx环境,允许在数据列中自动换行,并对\mytab第 1 列中的材料使用自定义命令(在下面的代码中调用),以避免出现不必要的额外换行符。

在此处输入图片描述

\documentclass[letterpaper]{article}
\usepackage[T1]{fontenc}
\usepackage{tabularx,booktabs,ragged2e,array,calc,amsmath}
\newcolumntype{C}[1]{>{\Centering}p{#1}}
\newcolumntype{L}{>{\raggedright}X}
\newcommand\mytab[1]{\smash[b]{\begin{tabular}[t]{@{}L@{}} #1 \end{tabular}}}

%\setlength{\pdfpagewidth}{8.5in} 
%\setlength{\pdfpageheight}{11in}

\begin{document}

%\centering % ??
\noindent
\begingroup 
\setlength\tabcolsep{3pt} % default: 6pt
\begin{tabularx}{\linewidth}{@{} L *{3}{C{\widthof{Contraceptive}}} @{}} 
\toprule
 & (1) & (2) & (3) \\
Variables & Contraceptive usage & Children ideally & AIDS awareness \\ 
\midrule
Own\_tv & 0.07*** & -0.21*** & 0.17*** \\
 & (0.01) & (0.02) & (0.01) \\ \addlinespace
Age & 0.07*** & 0.01 & 0.01*** \\
 & (0.00) & (0.01) & (0.00) \\ \addlinespace
\mytab{Newspaper regular Women = 2, Sometimes 2} & 0.04*** & 0.01 & 0.08*** \\
 & (0.01) & (0.03) & (0.01) \\ \addlinespace
\mytab{Newspaper regular Women = 3, Regularly 3} & -0.04** & -0.01 & 0.07*** \\
 & (0.02) & (0.03) & (0.01) \\ \addlinespace
\mytab{Radio regular Women = 2, Sometimes 2} & -0.04*** & 0.07*** & -0.02** \\
 & (0.01) & (0.02) & (0.01) \\ \addlinespace
\mytab{Radio regular Women = 3, Regularly 3} & -0.09*** & 0.09*** & -0.01 \\
 & (0.02) & (0.03) & (0.01) \\ \addlinespace
Constant & -0.77*** & 1.95*** & 0.11** \\
 & (0.06) & (0.11) & (0.05) \\ \addlinespace
Observations & 30,329 & 31,295 & 33,112 \\
R-squared & 0.086 & 0.127 & 0.271 \\
\midrule[\heavyrulewidth]
\multicolumn{4}{c}{ Robust standard errors in parentheses} \\
\multicolumn{4}{c}{ *** $p<0.01$, ** $p<0.05$, * $p<0.1$} \\
\end{tabularx} \endgroup
\end{document}

相关内容