0

I have imported this code from Stata using the 'esttab' command and I have tried to realign the regression output, more specifically the output for 'Year Dummies, Industry Dummies and Missing Year Dummy' to match up/align with other values. Any help would be greatly appreciated.

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{booktabs}
\usepackage{dcolumn}

\usepackage{siunitx}                        % added
\usepackage{threeparttable}                 % added % added

\begin{document}

\begin{table}[htbp]\centering
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{Investment on Bribes: Full Sample \label{tab1}}
\begin{tabular*}{0.8\columnwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{1}
{D{.}{.}{-1}}}
\toprule
            &\multicolumn{1}{c}{(1)}\\
            &\multicolumn{1}{c}{ln\_invest}\\
\midrule
Bribe&     0.00788         \\
                &      (0.44)         \\
\addlinespace
medium(20-99)       &       0.529         \\
                &      (1.53)         \\
\addlinespace
large(100 and over) &       2.171\sym{***}\\
                &      (3.88)         \\
\addlinespace
Govt=1              &       0.427         \\
                &      (0.96)         \\
\addlinespace
For=1               &      -0.337         \\
                &     (-1.08)         \\
 \addlinespace
 Obstacle            &       0.107         \\
                &      (0.68)         \\
 \addlinespace
 Agree               &      -0.168         \\
                &     (-1.16)         \\
 \addlinespace
 lnAge               &      0.0686         \\
                &      (0.29)         \\
\addlinespace
Year Dummies   & YES\\
\addlinespace
Industry Dummies & YES\\
\addlinespace
Missing Year Dummy  & YES\\
\addlinespace
Constant            &       9.976\sym{***}\\
                &     (17.64)         \\
\midrule
Observations                          &        6417         \\
\bottomrule
\multicolumn{2}{l}{\footnotesize \textit{t} statistics in parentheses}\\
\multicolumn{2}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), 
\sym{***} \(p<0.001\)}\\
\multicolumn{2}{l}{\footnotesize Note: Robust standard errors in parentheses}\\
\end{tabular*}
\end{table}
\end{document}

enter image description here

0

You could use \multicolumn{1}{c}{...}:

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{booktabs}
\usepackage{dcolumn}

\usepackage{siunitx}                        % added
\usepackage{threeparttable}                 % added % added

\begin{document}

    \begin{table}[htbp]\centering
        \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
        \caption{Investment on Bribes: Full Sample \label{tab1}}
        \begin{tabular*}{0.8\columnwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{1}
                {D{.}{.}{-1}}}
            \toprule
            &\multicolumn{1}{c}{(1)}\\
            &\multicolumn{1}{c}{ln\_invest}\\
            \midrule
            Bribe&     0.00788         \\
            &      (0.44)         \\
            \addlinespace
            medium(20-99)       &       0.529         \\
            &      (1.53)         \\
            \addlinespace
            large(100 and over) &       2.171\sym{***}\\
            &      (3.88)         \\
            \addlinespace
            Govt=1              &       0.427         \\
            &      (0.96)         \\
            \addlinespace
            For=1               &      -0.337         \\
            &     (-1.08)         \\
            \addlinespace
            Obstacle            &       0.107         \\
            &      (0.68)         \\
            \addlinespace
            Agree               &      -0.168         \\
            &     (-1.16)         \\
            \addlinespace
            lnAge               &      0.0686         \\
            &      (0.29)         \\
            \addlinespace
            Year Dummies   & \multicolumn{1}{c}{YES}\\
            \addlinespace
            Industry Dummies & \multicolumn{1}{c}{YES}\\
            \addlinespace
            Missing Year Dummy  & \multicolumn{1}{c}{YES}\\
            \addlinespace
            Constant            &       9.976\sym{***}\\
            &     (17.64)         \\
            \midrule
            Observations                          &        6417         \\
            \bottomrule
            \multicolumn{2}{l}{\footnotesize \textit{t} statistics in parentheses}\\
            \multicolumn{2}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), 
                \sym{***} \(p<0.001\)}\\
            \multicolumn{2}{l}{\footnotesize Note: Robust standard errors in parentheses}\\
        \end{tabular*}
    \end{table}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.