回帰表内で変数を移動する

回帰表内で変数を移動する

私は 'esttab' コマンドを使用して Stata からこのコードをインポートし、回帰出力、具体的には 'Year Dummies、Industry Dummies、Missing Year Dummy' の出力を他の値と一致/整列するように再調整しようとしました。ご協力いただければ幸いです。

\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}

ここに画像の説明を入力してください

答え1

次のように使用できます\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}

ここに画像の説明を入力してください

関連情報