1

I need to enlarge this table until it touches the right and left side of the A4 page. In a nutshell I should remove the margins on the sides. It's my first time using latex and I've tried several attempts, but none of them work. I'm pretty sure I'm setting some package wrong

This is the code. What should I change?

\documentclass{article} % or some other suitable document class

\usepackage[T1]{fontenc}
\usepackage[margin=1in]{geometry} % set page parameters appropriately
\usepackage{longtable}
\usepackage{booktabs} % for well-spaced horizontal rules
\usepackage{dcolumn}  % align numbers in columns on decimal markers
\newcolumntype{d}[1]{D..{#1}}

\newcommand{\mc}[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro

\begin{document}

\begingroup % localize scope of next four instructions
\small      % 10% linear reduction in font size
\setlength\tabcolsep{0pt} % let LaTeX figure out inter-column space
\setlength\LTleft{0pt} % see p. 7 of package's user guide
\setlength\LTright{0pt}

\begin{longtable}{@{\extracolsep{\fill}} l *{7}{d{2.5}} d{2.6} @{}} 

%% headers and footers
\caption{X} \label{tab:x} \\
\toprule 
& \multicolumn{8}{c}{\textit{Dependent variable:}} \\ 
& \multicolumn{8}{c}{$\log(\mathrm{tpens})$} \\ 
\cmidrule{2-9} 
& \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} 
& \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)}\\ 
\midrule
\endfirsthead

\multicolumn{9}{@{}l}{Table \thetable, continued}\\
\addlinespace
\toprule 
& \multicolumn{8}{c}{\textit{Dependent variable:}} \\ 
& \multicolumn{8}{c}{$\log(\mathrm{tpens})$} \\ 
\cmidrule{2-9} 
& \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} 
& \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)}\\ 
\midrule
\endhead

\midrule
\multicolumn{9}{r@{}}{\footnotesize (continued on next page)}\\
\endfoot

% empty final footer
\endlastfoot

%% body of table
 sex & 0.226^{***} & 0.219^{***} & 0.239^{***} & 0.244^{***} & 0.131^{***} & 0.132^{***} & 0.132^{***} & 0.142^{***} \\ 
  & (0.020) & (0.019) & (0.017) & (0.017) & (0.016) & (0.016) & (0.016) & (0.016) \\ 
\addlinespace
 eta & & -0.009^{***} & -0.005^{***} & -0.004^{***} & -0.002^{**} & -0.002^{**} & -0.002^{**} & -0.002^{*} \\ 
  & & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) \\ 
\addlinespace 
 studio\_lev2 & & & 0.330^{***} & 0.163^{***} & 0.129^{***} & 0.127^{***} & 0.127^{***} & 0.129^{***} \\ 
  & & & (0.021) & (0.023) & (0.022) & (0.022) & (0.022) & (0.022) \\ 
\addlinespace 
 studio\_lev3 & & & 0.717^{***} & 0.459^{***} & 0.420^{***} & 0.417^{***} & 0.417^{***} & 0.431^{***} \\ 
  & & & (0.035) & (0.038) & (0.036) & (0.036) & (0.036) & (0.036) \\ 
\addlinespace 
 type\_job\_Middle-class\_worker & & & & 0.219^{***} & 0.189^{***} & 0.187^{***} & 0.187^{***} & 0.191^{***} \\ 
  & & & & (0.023) & (0.022) & (0.022) & (0.022) & (0.022) \\ 
\addlinespace 
 type\_job\_Manager & & & & 0.465^{***} & 0.418^{***} & 0.414^{***} & 0.414^{***} & 0.410^{***} \\ 
  & & & & (0.039) & (0.037) & (0.037) & (0.037) & (0.036) \\ 
\addlinespace 
 type\_job\_Self-Employed & & & & -0.142^{***} & -0.189^{***} & -0.190^{***} & -0.189^{***} & -0.173^{***} \\ 
  & & & & (0.022) & (0.020) & (0.020) & (0.020) & (0.020) \\ 
\addlinespace 
 acontrib & & & & & 0.020^{***} & 0.020^{***} & 0.020^{***} & 0.019^{***} \\ 
          & & & & & (0.001) & (0.001) & (0.001) & (0.001) \\ 
\addlinespace 
 dislav & & & & & & -0.085^{***} & -0.085^{***} & -0.050^{*} \\ 
        & & & & & & (0.027) & (0.027) & (0.027) \\ 
\addlinespace 
 occnow & & & & & & &  0.029  &  0.075 \\ 
        & & & & & & & (0.072) & (0.073) \\ 
\addlinespace 
 ireg2 & & & & & & & &  0.147^{*} \\ 
       & & & & & & & & (0.080) \\ 
\addlinespace 
 ireg3 & & & & & & & & -0.005 \\ 
       & & & & & & & & (0.032) \\ 
\addlinespace 
 ireg4 & & & & & & & & -0.054 \\ 
       & & & & & & & & (0.039) \\ 
\addlinespace 
 ireg5 & & & & & & & & -0.012 \\ 
       & & & & & & & & (0.034) \\ 
\addlinespace 
 ireg6 & & & & & & & & 0.067 \\ 
       & & & & & & & & (0.050) \\ 
\addlinespace 
 ireg7 & & & & & & & & -0.080^{*} \\ 
       & & & & & & & & (0.043) \\ 
\addlinespace 
 ireg8 & & & & & & & &  0.076^{**} \\ 
       & & & & & & & & (0.036) \\ 
\addlinespace 
 ireg9 & & & & & & & & -0.018 \\ 
       & & & & & & & & (0.033) \\ 
\addlinespace      
 ireg10 & & & & & & & & -0.071 \\ 
        & & & & & & & & (0.045) \\ 
\addlinespace 
 ireg11 & & & & & & & &  0.050 \\ 
        & & & & & & & & (0.041) \\ 
\addlinespace 
 ireg12 & & & & & & & &  0.012 \\ 
        & & & & & & & & (0.038) \\ 
\addlinespace 
 ireg13 & & & & & & & & -0.099^{*} \\ 
        & & & & & & & & (0.060) \\ 
\addlinespace 
 ireg14 & & & & & & & & -0.217^{***} \\ 
        & & & & & & & & (0.056) \\ 
\addlinespace 
 ireg15 & & & & & & & & -0.091^{**} \\ 
        & & & & & & & & (0.039) \\ 
\addlinespace 
 ireg16 & & & & & & & & -0.120^{***} \\ 
        & & & & & & & & (0.040) \\ 
\addlinespace 
 ireg17 & & & & & & & & -0.176^{***} \\ 
        & & & & & & & & (0.054) \\ 
\addlinespace 
 ireg18 & & & & & & & & -0.019 \\
        & & & & & & & & (0.046) \\ 
\addlinespace 
 ireg19 & & & & & & & & -0.126^{***} \\ 
        & & & & & & & & (0.044) \\ 
\addlinespace 
 ireg20 & & & & & & & & -0.021 \\ 
        & & & & & & & & (0.039) \\ 
\addlinespace 
 Constant & 6.860^{***} & 7.530^{***} & 7.133^{***} & 7.034^{***} & 6.273^{***} & 6.324^{***} & 6.266^{***} & 6.171^{***} \\ 
          & (0.015) & (0.089) & (0.082) & (0.078) & (0.082) & (0.083) & (0.166) & (0.170) \\ 
  
\midrule

Observations & \mc{2{,}229} & \mc{2{,}229} & \mc{2{,}229} & \mc{2{,}226} & \mc{2{,}173} & \mc{2{,}173} & \mc{2{,}173} & \mc{2{,}173} \\ 
$R^{2}$ & 0.056 & 0.081 & 0.270 & 0.358 & 0.455 & 0.457 & 0.457 & 0.476 \\ 
Adjusted $R^{2}$ & 0.056 & 0.080 & 0.269 & 0.356 & 0.453 & 0.455 & 0.455 & 0.469 \\ 
Resid.\ Std.\ Error & 0.406 & 0.400 & 0.357 & 0.335 & 0.309 & 0.309 & 0.309 & 0.305 \\ 
\qquad df & \mc{2227} & \mc{2226} & \mc{2224} & \mc{2218} & \mc{2164} & \mc{2163} & \mc{2162} & \mc{2143} \\
$F$-Statistic 
& \mc{133.081} & \mc{97.706} & \mc{206.134} & \mc{176.461} & \mc{225.471 } & \mc{202.428} & \mc{182.131} & \mc{67.151} \\ 
\qquad df & \mc{1;2227} & \mc{2;2226} & \mc{4;2224} & \mc{7;2218} & \mc{8;2164} & \mc{9;2163} & \mc{10;2162} & \mc{29;2143}  \\
\bottomrule
\addlinespace
\multicolumn{9}{@{}l}{\textit{Note}: $^{*}\ p<0.1$; $^{**}\ p<0.05$; $^{***}\ p<0.01$} \\  
\end{longtable} 
\endgroup

\end{document}

7
  • 2
    You are already changing \LTleft and \LTright. Have to tried to use negative values there, e.g., -1in, because you've set the margin to 1in? Or if this should be the whole document, just try using magin=0in instead of margin=1in and see the geometry manual for more information.
    – cabohah
    Commented May 3, 2023 at 8:00
  • hi @cabohah and thank for the answer! A guy helped me in writing this code, because i'm completely a newbie about it. I've tried to set negative values in \LTleft and \LTright but nothing seems to happen ( also with huge neegative value). If I set magin=0in in geometry , only the upper margin is removed, while the left and right ones remain...
    – io_boh
    Commented May 3, 2023 at 8:25
  • What is wrong your table? Why you use \- for coNnecting words in the first column? Using longtable you need to compile document more than two times to get final look out.
    – Zarko
    Commented May 3, 2023 at 8:46
  • hi @Zarko A guy helped me in doing this. I think he uses /- because I was having problem with the original latex output that a statistical tool gave me
    – io_boh
    Commented May 3, 2023 at 8:54
  • @io_boh I don't know, why nothing happend after your change. As shown in my answer, both suggestions do work.
    – cabohah
    Commented May 3, 2023 at 9:26

1 Answer 1

1

As already explained in a comment, you can set \LTleft and \LTright to -1in to extend the longtable into the left and right margin, that you've set using margin=1in for package geometry:

\documentclass{article} % or some other suitable document class

\usepackage[T1]{fontenc}
\usepackage[margin=1in]{geometry} % set page parameters appropriately
\usepackage{longtable}
\usepackage{booktabs} % for well-spaced horizontal rules
\usepackage{dcolumn}  % align numbers in columns on decimal markers
\newcolumntype{d}[1]{D..{#1}}

\newcommand{\mc}[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro

\begin{document}

\begingroup % localize scope of next four instructions
\small      % 10% linear reduction in font size
\setlength\tabcolsep{0pt} % let LaTeX figure out inter-column space
\setlength\LTleft{-1in}% extend by left margin (see geometry option margin=1in) see p. 7 of package's user guide
\setlength\LTright{-1in}% extend by rightmargin (see geometry option margin=1in)

\begin{longtable}{@{\extracolsep{\fill}} l *{7}{d{2.5}} d{2.6} @{}} 

%% headers and footers
\caption{X} \label{tab:x} \\
\toprule 
& \multicolumn{8}{c}{\textit{Dependent variable:}} \\ 
& \multicolumn{8}{c}{$\log(\mathrm{tpens})$} \\ 
\cmidrule{2-9} 
& \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} 
& \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)}\\ 
\midrule
\endfirsthead

\multicolumn{9}{@{}l}{Table \thetable, continued}\\
\addlinespace
\toprule 
& \multicolumn{8}{c}{\textit{Dependent variable:}} \\ 
& \multicolumn{8}{c}{$\log(\mathrm{tpens})$} \\ 
\cmidrule{2-9} 
& \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} 
& \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)}\\ 
\midrule
\endhead

\midrule
\multicolumn{9}{r@{}}{\footnotesize (continued on next page)}\\
\endfoot

% empty final footer
\endlastfoot

%% body of table
 sex & 0.226^{***} & 0.219^{***} & 0.239^{***} & 0.244^{***} & 0.131^{***} & 0.132^{***} & 0.132^{***} & 0.142^{***} \\ 
  & (0.020) & (0.019) & (0.017) & (0.017) & (0.016) & (0.016) & (0.016) & (0.016) \\ 
\addlinespace
 eta & & -0.009^{***} & -0.005^{***} & -0.004^{***} & -0.002^{**} & -0.002^{**} & -0.002^{**} & -0.002^{*} \\ 
  & & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) \\ 
\addlinespace 
 studio\_lev2 & & & 0.330^{***} & 0.163^{***} & 0.129^{***} & 0.127^{***} & 0.127^{***} & 0.129^{***} \\ 
  & & & (0.021) & (0.023) & (0.022) & (0.022) & (0.022) & (0.022) \\ 
\addlinespace 
 studio\_lev3 & & & 0.717^{***} & 0.459^{***} & 0.420^{***} & 0.417^{***} & 0.417^{***} & 0.431^{***} \\ 
  & & & (0.035) & (0.038) & (0.036) & (0.036) & (0.036) & (0.036) \\ 
\addlinespace 
 type\_job\_Middle-class\_worker & & & & 0.219^{***} & 0.189^{***} & 0.187^{***} & 0.187^{***} & 0.191^{***} \\ 
  & & & & (0.023) & (0.022) & (0.022) & (0.022) & (0.022) \\ 
\addlinespace 
 type\_job\_Manager & & & & 0.465^{***} & 0.418^{***} & 0.414^{***} & 0.414^{***} & 0.410^{***} \\ 
  & & & & (0.039) & (0.037) & (0.037) & (0.037) & (0.036) \\ 
\addlinespace 
 type\_job\_Self-Employed & & & & -0.142^{***} & -0.189^{***} & -0.190^{***} & -0.189^{***} & -0.173^{***} \\ 
  & & & & (0.022) & (0.020) & (0.020) & (0.020) & (0.020) \\ 
\addlinespace 
 acontrib & & & & & 0.020^{***} & 0.020^{***} & 0.020^{***} & 0.019^{***} \\ 
          & & & & & (0.001) & (0.001) & (0.001) & (0.001) \\ 
\addlinespace 
 dislav & & & & & & -0.085^{***} & -0.085^{***} & -0.050^{*} \\ 
        & & & & & & (0.027) & (0.027) & (0.027) \\ 
\addlinespace 
 occnow & & & & & & &  0.029  &  0.075 \\ 
        & & & & & & & (0.072) & (0.073) \\ 
\addlinespace 
 ireg2 & & & & & & & &  0.147^{*} \\ 
       & & & & & & & & (0.080) \\ 
\addlinespace 
 ireg3 & & & & & & & & -0.005 \\ 
       & & & & & & & & (0.032) \\ 
\addlinespace 
 ireg4 & & & & & & & & -0.054 \\ 
       & & & & & & & & (0.039) \\ 
\addlinespace 
 ireg5 & & & & & & & & -0.012 \\ 
       & & & & & & & & (0.034) \\ 
\addlinespace 
 ireg6 & & & & & & & & 0.067 \\ 
       & & & & & & & & (0.050) \\ 
\addlinespace 
 ireg7 & & & & & & & & -0.080^{*} \\ 
       & & & & & & & & (0.043) \\ 
\addlinespace 
 ireg8 & & & & & & & &  0.076^{**} \\ 
       & & & & & & & & (0.036) \\ 
\addlinespace 
 ireg9 & & & & & & & & -0.018 \\ 
       & & & & & & & & (0.033) \\ 
\addlinespace      
 ireg10 & & & & & & & & -0.071 \\ 
        & & & & & & & & (0.045) \\ 
\addlinespace 
 ireg11 & & & & & & & &  0.050 \\ 
        & & & & & & & & (0.041) \\ 
\addlinespace 
 ireg12 & & & & & & & &  0.012 \\ 
        & & & & & & & & (0.038) \\ 
\addlinespace 
 ireg13 & & & & & & & & -0.099^{*} \\ 
        & & & & & & & & (0.060) \\ 
\addlinespace 
 ireg14 & & & & & & & & -0.217^{***} \\ 
        & & & & & & & & (0.056) \\ 
\addlinespace 
 ireg15 & & & & & & & & -0.091^{**} \\ 
        & & & & & & & & (0.039) \\ 
\addlinespace 
 ireg16 & & & & & & & & -0.120^{***} \\ 
        & & & & & & & & (0.040) \\ 
\addlinespace 
 ireg17 & & & & & & & & -0.176^{***} \\ 
        & & & & & & & & (0.054) \\ 
\addlinespace 
 ireg18 & & & & & & & & -0.019 \\
        & & & & & & & & (0.046) \\ 
\addlinespace 
 ireg19 & & & & & & & & -0.126^{***} \\ 
        & & & & & & & & (0.044) \\ 
\addlinespace 
 ireg20 & & & & & & & & -0.021 \\ 
        & & & & & & & & (0.039) \\ 
\addlinespace 
 Constant & 6.860^{***} & 7.530^{***} & 7.133^{***} & 7.034^{***} & 6.273^{***} & 6.324^{***} & 6.266^{***} & 6.171^{***} \\ 
          & (0.015) & (0.089) & (0.082) & (0.078) & (0.082) & (0.083) & (0.166) & (0.170) \\ 
  
\midrule

Observations & \mc{2{,}229} & \mc{2{,}229} & \mc{2{,}229} & \mc{2{,}226} & \mc{2{,}173} & \mc{2{,}173} & \mc{2{,}173} & \mc{2{,}173} \\ 
$R^{2}$ & 0.056 & 0.081 & 0.270 & 0.358 & 0.455 & 0.457 & 0.457 & 0.476 \\ 
Adjusted $R^{2}$ & 0.056 & 0.080 & 0.269 & 0.356 & 0.453 & 0.455 & 0.455 & 0.469 \\ 
Resid.\ Std.\ Error & 0.406 & 0.400 & 0.357 & 0.335 & 0.309 & 0.309 & 0.309 & 0.305 \\ 
\qquad df & \mc{2227} & \mc{2226} & \mc{2224} & \mc{2218} & \mc{2164} & \mc{2163} & \mc{2162} & \mc{2143} \\
$F$-Statistic 
& \mc{133.081} & \mc{97.706} & \mc{206.134} & \mc{176.461} & \mc{225.471 } & \mc{202.428} & \mc{182.131} & \mc{67.151} \\ 
\qquad df & \mc{1;2227} & \mc{2;2226} & \mc{4;2224} & \mc{7;2218} & \mc{8;2164} & \mc{9;2163} & \mc{10;2162} & \mc{29;2143}  \\
\bottomrule
\addlinespace
\multicolumn{9}{@{}l}{\textit{Note}: $^{*}\ p<0.1$; $^{**}\ p<0.05$; $^{***}\ p<0.01$} \\  
\end{longtable} 
\endgroup

\end{document}

But in my opinion, this is too less margin:

enter image description here

So you should at least change the longtable declaration to:

\begin{longtable}{@{\hspace{.25em}\extracolsep{\fill}} l *{7}{d{2.5}} d{2.6} @{\hspace{.25em}}} 

(I'll show the result in the next example.)

Alternatively, if you whole document should not have left and right margins, you can set left and right to 0in with geometry:

\documentclass{article} % or some other suitable document class

\usepackage[T1]{fontenc}
\usepackage[margin=1in,left=0pt,right=0pt]{geometry} % set page parameters appropriately
\usepackage{longtable}
\usepackage{booktabs} % for well-spaced horizontal rules
\usepackage{dcolumn}  % align numbers in columns on decimal markers
\newcolumntype{d}[1]{D..{#1}}

\newcommand{\mc}[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro

\begin{document}

\begingroup % localize scope of next four instructions
\small      % 10% linear reduction in font size
\setlength\tabcolsep{0pt} % let LaTeX figure out inter-column space
\setlength\LTleft{0pt}% see p. 7 of package's user guide
\setlength\LTright{0pt}%

\begin{longtable}{@{\hspace{.25em}\extracolsep{\fill}} l *{7}{d{2.5}} d{2.6} @{\hspace{.25em}}} 

%% headers and footers
\caption{X} \label{tab:x} \\
\toprule 
& \multicolumn{8}{c}{\textit{Dependent variable:}} \\ 
& \multicolumn{8}{c}{$\log(\mathrm{tpens})$} \\ 
\cmidrule{2-9} 
& \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} 
& \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)}\\ 
\midrule
\endfirsthead

\multicolumn{9}{@{}l}{Table \thetable, continued}\\
\addlinespace
\toprule 
& \multicolumn{8}{c}{\textit{Dependent variable:}} \\ 
& \multicolumn{8}{c}{$\log(\mathrm{tpens})$} \\ 
\cmidrule{2-9} 
& \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} 
& \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)}\\ 
\midrule
\endhead

\midrule
\multicolumn{9}{r@{}}{\footnotesize (continued on next page)}\\
\endfoot

% empty final footer
\endlastfoot

%% body of table
 sex & 0.226^{***} & 0.219^{***} & 0.239^{***} & 0.244^{***} & 0.131^{***} & 0.132^{***} & 0.132^{***} & 0.142^{***} \\ 
  & (0.020) & (0.019) & (0.017) & (0.017) & (0.016) & (0.016) & (0.016) & (0.016) \\ 
\addlinespace
 eta & & -0.009^{***} & -0.005^{***} & -0.004^{***} & -0.002^{**} & -0.002^{**} & -0.002^{**} & -0.002^{*} \\ 
  & & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) & (0.001) \\ 
\addlinespace 
 studio\_lev2 & & & 0.330^{***} & 0.163^{***} & 0.129^{***} & 0.127^{***} & 0.127^{***} & 0.129^{***} \\ 
  & & & (0.021) & (0.023) & (0.022) & (0.022) & (0.022) & (0.022) \\ 
\addlinespace 
 studio\_lev3 & & & 0.717^{***} & 0.459^{***} & 0.420^{***} & 0.417^{***} & 0.417^{***} & 0.431^{***} \\ 
  & & & (0.035) & (0.038) & (0.036) & (0.036) & (0.036) & (0.036) \\ 
\addlinespace 
 type\_job\_Middle-class\_worker & & & & 0.219^{***} & 0.189^{***} & 0.187^{***} & 0.187^{***} & 0.191^{***} \\ 
  & & & & (0.023) & (0.022) & (0.022) & (0.022) & (0.022) \\ 
\addlinespace 
 type\_job\_Manager & & & & 0.465^{***} & 0.418^{***} & 0.414^{***} & 0.414^{***} & 0.410^{***} \\ 
  & & & & (0.039) & (0.037) & (0.037) & (0.037) & (0.036) \\ 
\addlinespace 
 type\_job\_Self-Employed & & & & -0.142^{***} & -0.189^{***} & -0.190^{***} & -0.189^{***} & -0.173^{***} \\ 
  & & & & (0.022) & (0.020) & (0.020) & (0.020) & (0.020) \\ 
\addlinespace 
 acontrib & & & & & 0.020^{***} & 0.020^{***} & 0.020^{***} & 0.019^{***} \\ 
          & & & & & (0.001) & (0.001) & (0.001) & (0.001) \\ 
\addlinespace 
 dislav & & & & & & -0.085^{***} & -0.085^{***} & -0.050^{*} \\ 
        & & & & & & (0.027) & (0.027) & (0.027) \\ 
\addlinespace 
 occnow & & & & & & &  0.029  &  0.075 \\ 
        & & & & & & & (0.072) & (0.073) \\ 
\addlinespace 
 ireg2 & & & & & & & &  0.147^{*} \\ 
       & & & & & & & & (0.080) \\ 
\addlinespace 
 ireg3 & & & & & & & & -0.005 \\ 
       & & & & & & & & (0.032) \\ 
\addlinespace 
 ireg4 & & & & & & & & -0.054 \\ 
       & & & & & & & & (0.039) \\ 
\addlinespace 
 ireg5 & & & & & & & & -0.012 \\ 
       & & & & & & & & (0.034) \\ 
\addlinespace 
 ireg6 & & & & & & & & 0.067 \\ 
       & & & & & & & & (0.050) \\ 
\addlinespace 
 ireg7 & & & & & & & & -0.080^{*} \\ 
       & & & & & & & & (0.043) \\ 
\addlinespace 
 ireg8 & & & & & & & &  0.076^{**} \\ 
       & & & & & & & & (0.036) \\ 
\addlinespace 
 ireg9 & & & & & & & & -0.018 \\ 
       & & & & & & & & (0.033) \\ 
\addlinespace      
 ireg10 & & & & & & & & -0.071 \\ 
        & & & & & & & & (0.045) \\ 
\addlinespace 
 ireg11 & & & & & & & &  0.050 \\ 
        & & & & & & & & (0.041) \\ 
\addlinespace 
 ireg12 & & & & & & & &  0.012 \\ 
        & & & & & & & & (0.038) \\ 
\addlinespace 
 ireg13 & & & & & & & & -0.099^{*} \\ 
        & & & & & & & & (0.060) \\ 
\addlinespace 
 ireg14 & & & & & & & & -0.217^{***} \\ 
        & & & & & & & & (0.056) \\ 
\addlinespace 
 ireg15 & & & & & & & & -0.091^{**} \\ 
        & & & & & & & & (0.039) \\ 
\addlinespace 
 ireg16 & & & & & & & & -0.120^{***} \\ 
        & & & & & & & & (0.040) \\ 
\addlinespace 
 ireg17 & & & & & & & & -0.176^{***} \\ 
        & & & & & & & & (0.054) \\ 
\addlinespace 
 ireg18 & & & & & & & & -0.019 \\
        & & & & & & & & (0.046) \\ 
\addlinespace 
 ireg19 & & & & & & & & -0.126^{***} \\ 
        & & & & & & & & (0.044) \\ 
\addlinespace 
 ireg20 & & & & & & & & -0.021 \\ 
        & & & & & & & & (0.039) \\ 
\addlinespace 
 Constant & 6.860^{***} & 7.530^{***} & 7.133^{***} & 7.034^{***} & 6.273^{***} & 6.324^{***} & 6.266^{***} & 6.171^{***} \\ 
          & (0.015) & (0.089) & (0.082) & (0.078) & (0.082) & (0.083) & (0.166) & (0.170) \\ 
  
\midrule

Observations & \mc{2{,}229} & \mc{2{,}229} & \mc{2{,}229} & \mc{2{,}226} & \mc{2{,}173} & \mc{2{,}173} & \mc{2{,}173} & \mc{2{,}173} \\ 
$R^{2}$ & 0.056 & 0.081 & 0.270 & 0.358 & 0.455 & 0.457 & 0.457 & 0.476 \\ 
Adjusted $R^{2}$ & 0.056 & 0.080 & 0.269 & 0.356 & 0.453 & 0.455 & 0.455 & 0.469 \\ 
Resid.\ Std.\ Error & 0.406 & 0.400 & 0.357 & 0.335 & 0.309 & 0.309 & 0.309 & 0.305 \\ 
\qquad df & \mc{2227} & \mc{2226} & \mc{2224} & \mc{2218} & \mc{2164} & \mc{2163} & \mc{2162} & \mc{2143} \\
$F$-Statistic 
& \mc{133.081} & \mc{97.706} & \mc{206.134} & \mc{176.461} & \mc{225.471 } & \mc{202.428} & \mc{182.131} & \mc{67.151} \\ 
\qquad df & \mc{1;2227} & \mc{2;2226} & \mc{4;2224} & \mc{7;2218} & \mc{8;2164} & \mc{9;2163} & \mc{10;2162} & \mc{29;2143}  \\
\bottomrule
\addlinespace
\multicolumn{9}{@{}l}{\textit{Note}: $^{*}\ p<0.1$; $^{**}\ p<0.05$; $^{***}\ p<0.01$} \\  
\end{longtable} 
\endgroup

\end{document}

enter image description here

You can also remove the top and the bottom margin. Please the the geometry manual for more information.

Just my opinion: I always find it difficult to read tables where the columns have been artificially widened. This lacks more orientation in the row and also the cohesion of the values. Because of this, I generally cannot recommend to this.

BTW: Setting \tabcolsep to 0pt is usually not the best idea. It can lead to the columns butting up against each other without any spacing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .