我的文档放不下此表格

我的文档放不下此表格

我的表格存在过满问题,而且由于我是 Latex 的初学者,我需要帮助。以下是表格:

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}
\graphicspath{ {./images/} }
\usepackage{titling}
\usepackage{blindtext}

    % Table created by stargazer v.5.2.2 by Marek Hlavac, Harvard University. E-mail: hlavac at fas.harvard.edu
    % Date and time: sex, dez 13, 2019 - 18:16:21
    \begin{table}[!htbp] \centering 
      \caption{Quantile regression approach} 
      \label{} 
    \begin{tabular}{@{\extracolsep{5pt}}lcccccccccc} 
    \\[-1.8ex]\hline 
    \hline \\[-1.8ex] 
     & \multicolumn{10}{c}{\textit{Dependent variable:}} \\ 
    \cline{2-11} 
    \\[-1.8ex] & \multicolumn{10}{c}{School attendance} \\ 
    \\[-1.8ex] & \textit{OLS} & \multicolumn{9}{c}{\textit{quantile}} \\ 
     & \textit{} & \multicolumn{9}{c}{\textit{regression}} \\ 
     &  & Q10 & Q20 & Q30 & Q40 & Q50 & Q60 & Q70 & Q80 & Q90 \\ 
    \hline \\[-1.8ex] 
     Piped water and sewage & 0.071$^{***}$ & 0.101$^{***}$ & 0.073$^{***}$ & 0.069$^{***}$ & 0.060$^{***}$ & 0.052$^{***}$ & 0.031$^{***}$ & 0.019$^{***}$ & 0.002 & $-$0.001 \\ 
      & (0.006) & (0.020) & (0.008) & (0.010) & (0.007) & (0.008) & (0.009) & (0.006) & (0.003) & (0.003) \\ 
      & & & & & & & & & & \\ 
     Water & $-$0.055$^{***}$ & $-$0.057$^{**}$ & $-$0.038$^{***}$ & $-$0.048$^{***}$ & $-$0.047$^{***}$ & $-$0.045$^{***}$ & $-$0.026$^{***}$ & $-$0.017$^{**}$ & $-$0.0002 & 0.003 \\ 
      & (0.006) & (0.023) & (0.010) & (0.012) & (0.009) & (0.010) & (0.010) & (0.007) & (0.004) & (0.003) \\ 
      & & & & & & & & & & \\ 
     Illiteracy & 0.054$^{***}$ & 0.058$^{***}$ & 0.050$^{***}$ & 0.045$^{***}$ & 0.040$^{***}$ & 0.037$^{***}$ & 0.031$^{***}$ & 0.026$^{***}$ & 0.020$^{***}$ & 0.010$^{***}$ \\ 
      & (0.004) & (0.005) & (0.003) & (0.002) & (0.002) & (0.001) & (0.002) & (0.001) & (0.001) & (0.001) \\ 
      & & & & & & & & & & \\ 
     Gini & 1.611$^{***}$ & 1.820$^{***}$ & 1.557$^{***}$ & 1.409$^{***}$ & 1.252$^{***}$ & 1.134$^{***}$ & 0.978$^{***}$ & 0.850$^{***}$ & 0.689$^{***}$ & 0.490$^{***}$ \\ 
      & (0.023) & (0.060) & (0.033) & (0.028) & (0.024) & (0.023) & (0.021) & (0.019) & (0.018) & (0.013) \\ 
      & & & & & & & & & & \\ 
     Income per capita & $-$0.229$^{***}$ & $-$0.235$^{***}$ & $-$0.202$^{***}$ & $-$0.180$^{***}$ & $-$0.156$^{***}$ & $-$0.140$^{***}$ & $-$0.119$^{***}$ & $-$0.102$^{***}$ & $-$0.081$^{***}$ & $-$0.059$^{***}$ \\ 
      & (0.005) & (0.010) & (0.005) & (0.004) & (0.003) & (0.003) & (0.003) & (0.003) & (0.002) & (0.002) \\ 
      & & & & & & & & & & \\ 
     Population & 0.014$^{***}$ & 0.014$^{***}$ & 0.015$^{***}$ & 0.015$^{***}$ & 0.014$^{***}$ & 0.014$^{***}$ & 0.013$^{***}$ & 0.013$^{***}$ & 0.012$^{***}$ & 0.012$^{***}$ \\ 
      & (0.001) & (0.001) & (0.001) & (0.001) & (0.0005) & (0.0005) & (0.0004) & (0.0003) & (0.0002) & (0.0003) \\ 
      & & & & & & & & & & \\ 
     Health and sanitation & 0.008$^{***}$ & 0.001 & 0.001 & 0.003$^{**}$ & 0.004$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.005$^{***}$ & 0.005$^{***}$ \\ 
      & (0.002) & (0.002) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.0005) & (0.001) \\ 
      & & & & & & & & & & \\ 
     Education and culture & 0.004$^{**}$ & 0.010$^{***}$ & 0.010$^{***}$ & 0.009$^{***}$ & 0.008$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.005$^{***}$ \\ 
      & (0.002) & (0.002) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.0005) & (0.001) \\ 
      & & & & & & & & & & \\ 
     Constant & 2.549$^{***}$ & 2.503$^{***}$ & 2.424$^{***}$ & 2.391$^{***}$ & 2.346$^{***}$ & 2.313$^{***}$ & 2.261$^{***}$ & 2.220$^{***}$ & 2.167$^{***}$ & 2.109$^{***}$ \\ 
      & (0.017) & (0.033) & (0.018) & (0.013) & (0.012) & (0.011) & (0.011) & (0.009) & (0.007) & (0.005) \\ 
      & & & & & & & & & & \\ 
    \hline \\[-1.8ex] 
    Observations & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 \\ 
    R$^{2}$ & 0.780 &  &  &  &  &  &  &  &  &  \\ 
    Adjusted R$^{2}$ & 0.780 &  &  &  &  &  &  &  &  &  \\ 
    Residual Std. Error & 0.041 (df = 8131) &  &  &  &  &  &  &  &  &  \\ 
    F Statistic & 3,604.162$^{***}$ (df = 8; 8131) &  &  &  &  &  &  &  &  &  \\ 
    \hline 
    \hline \\[-1.8ex] 
    \textit{Note:}  & \multicolumn{10}{r}{$^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \\ 
    \end{tabular}
    \end{table}

\end{document}

我需要表格中的所有信息,包括***。

答案1

借助landscape环境,使用稍微小一点\tabcolsep\addlinespacebooktabs代替空行,您可以实现以下结果。

就我个人而言,我更喜欢包装上的水平线,而booktabs不是\hlines。如果您希望进一步改善其列内数字的对齐方式,您可能会对siunitx包装及其S类型列感兴趣。

在此处输入图片描述

\documentclass[a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{pdflscape}
\usepackage{tabularx}
\usepackage{booktabs}

\begin{document}


\begin{landscape}
\begin{table}[!htbp] \centering \setlength{\tabcolsep}{3.9pt}
  \caption{Quantile regression approach} 
  \label{} 
\begin{tabular}{lcccccccccc} 
\\[-1.8ex]\hline 
\hline \\[-1.8ex] 
 & \multicolumn{10}{c}{\textit{Dependent variable:}} \\ 
\cline{2-11} 
\\[-1.8ex] & \multicolumn{10}{c}{School attendance} \\ 
\\[-1.8ex] & \textit{OLS} & \multicolumn{9}{c}{\textit{quantile}} \\ 
 & \textit{} & \multicolumn{9}{c}{\textit{regression}} \\ 
 &  & Q10 & Q20 & Q30 & Q40 & Q50 & Q60 & Q70 & Q80 & Q90 \\ 
\hline \\[-1.8ex] 
 Piped water and sewage & 0.071$^{***}$ & 0.101$^{***}$ & 0.073$^{***}$ & 0.069$^{***}$ & 0.060$^{***}$ & 0.052$^{***}$ & 0.031$^{***}$ & 0.019$^{***}$ & 0.002 & $-$0.001 \\ 
  & (0.006) & (0.020) & (0.008) & (0.010) & (0.007) & (0.008) & (0.009) & (0.006) & (0.003) & (0.003) \\ 
\addlinespace
 Water & $-$0.055$^{***}$ & $-$0.057$^{**}$ & $-$0.038$^{***}$ & $-$0.048$^{***}$ & $-$0.047$^{***}$ & $-$0.045$^{***}$ & $-$0.026$^{***}$ & $-$0.017$^{**}$ & $-$0.0002 & 0.003 \\ 
  & (0.006) & (0.023) & (0.010) & (0.012) & (0.009) & (0.010) & (0.010) & (0.007) & (0.004) & (0.003) \\ 
\addlinespace
 Illiteracy & 0.054$^{***}$ & 0.058$^{***}$ & 0.050$^{***}$ & 0.045$^{***}$ & 0.040$^{***}$ & 0.037$^{***}$ & 0.031$^{***}$ & 0.026$^{***}$ & 0.020$^{***}$ & 0.010$^{***}$ \\ 
  & (0.004) & (0.005) & (0.003) & (0.002) & (0.002) & (0.001) & (0.002) & (0.001) & (0.001) & (0.001) \\ 
\addlinespace
 Gini & 1.611$^{***}$ & 1.820$^{***}$ & 1.557$^{***}$ & 1.409$^{***}$ & 1.252$^{***}$ & 1.134$^{***}$ & 0.978$^{***}$ & 0.850$^{***}$ & 0.689$^{***}$ & 0.490$^{***}$ \\ 
  & (0.023) & (0.060) & (0.033) & (0.028) & (0.024) & (0.023) & (0.021) & (0.019) & (0.018) & (0.013) \\ 
\addlinespace
 Income per capita & $-$0.229$^{***}$ & $-$0.235$^{***}$ & $-$0.202$^{***}$ & $-$0.180$^{***}$ & $-$0.156$^{***}$ & $-$0.140$^{***}$ & $-$0.119$^{***}$ & $-$0.102$^{***}$ & $-$0.081$^{***}$ & $-$0.059$^{***}$ \\ 
  & (0.005) & (0.010) & (0.005) & (0.004) & (0.003) & (0.003) & (0.003) & (0.003) & (0.002) & (0.002) \\ 
\addlinespace
 Population & 0.014$^{***}$ & 0.014$^{***}$ & 0.015$^{***}$ & 0.015$^{***}$ & 0.014$^{***}$ & 0.014$^{***}$ & 0.013$^{***}$ & 0.013$^{***}$ & 0.012$^{***}$ & 0.012$^{***}$ \\ 
  & (0.001) & (0.001) & (0.001) & (0.001) & (0.0005) & (0.0005) & (0.0004) & (0.0003) & (0.0002) & (0.0003) \\ 
\addlinespace 
 Health and sanitation & 0.008$^{***}$ & 0.001 & 0.001 & 0.003$^{**}$ & 0.004$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.005$^{***}$ & 0.005$^{***}$ \\ 
  & (0.002) & (0.002) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.0005) & (0.001) \\ 
\addlinespace 
 Education and culture & 0.004$^{**}$ & 0.010$^{***}$ & 0.010$^{***}$ & 0.009$^{***}$ & 0.008$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.006$^{***}$ & 0.005$^{***}$ \\ 
  & (0.002) & (0.002) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.0005) & (0.001) \\ 
\addlinespace 
 Constant & 2.549$^{***}$ & 2.503$^{***}$ & 2.424$^{***}$ & 2.391$^{***}$ & 2.346$^{***}$ & 2.313$^{***}$ & 2.261$^{***}$ & 2.220$^{***}$ & 2.167$^{***}$ & 2.109$^{***}$ \\ 
  & (0.017) & (0.033) & (0.018) & (0.013) & (0.012) & (0.011) & (0.011) & (0.009) & (0.007) & (0.005) \\ 
\addlinespace
\hline \\[-1.8ex] 
Observations & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 & 8,140 \\ 
R$^{2}$ & 0.780 &  &  &  &  &  &  &  &  &  \\ 
Adjusted R$^{2}$ & 0.780 &  &  &  &  &  &  &  &  &  \\ 
Residual Std. Error & 0.041 (df = 8131) &  &  &  &  &  &  &  &  &  \\ 
F Statistic & 3,604.162$^{***}$ (df = 8; 8131) &  &  &  &  &  &  &  &  &  \\ 
\hline 
\hline \\[-1.8ex] 
\textit{Note:}  & \multicolumn{10}{r}{$^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \\ 
\end{tabular}
\end{table}
\end{landscape}
\end{document}

相关内容