回帰結果表の下に有意水準を追加する

回帰結果表の下に有意水準を追加する

次のような表があります。

\begin{table}[htbp]\centering
\caption{Dependent Variable: Enrollment}
\begin{tabular}{c c c c}
\hline\hline 
\textbf{Variable} & \textbf{Model 1} & \textbf{Model 2} & \textbf{Model 3}\\ \hline
frl         &      -0.012   &      -0.052   &      -0.156** \\
            &      (0.04)   &      (0.06)   &      (0.06)   \\
minority    &               &       0.034   &       0.097*  \\
            &               &      (0.05)   &      (0.04)   \\
disting     &               &               &       0.439***\\
            &               &               &      (0.06)   \\
cons       &       0.529***&       0.530***&       0.518***\\
            &      (0.03)   &      (0.03)   &      (0.02)   \\
\hline  N           &     196   &     196   &     196   \\          
R$^{2}$           &       0.001   &       0.003   &       0.235   \\
\hline
\end{tabular}
\end{table}

下記の統計的有意性の星を追加したいのですが、3 つの複数列を含むコードを追加できないようです。表の最後に次のコードを追加しようとしましたが、うまくいかないようです。

\bottomrule
\vspace{-3mm}\\
\multicolumn{3}{l}{\textsuperscript{***}$p<0.01$, 
  \textsuperscript{**}$p<0.05$, 
  \textsuperscript{*}$p<0.1$, 

テキストに上付き文字を追加するにはどうすればよいでしょうか?

答え1

実際に、パッケージの\multicolumnおよび を使用できます。\addlinespacebooktabs

\documentclass{article}
\usepackage{booktabs}

\begin{document}

\begin{table}[htbp]\centering
\caption{Dependent Variable: Enrollment}
\begin{tabular}{c c c c}
\toprule
\textbf{Variable} & \textbf{Model 1} & \textbf{Model 2} & \textbf{Model 3}\\ 
\midrule
frl         &      -0.012   &      -0.052   &      -0.156** \\
            &      (0.04)   &      (0.06)   &      (0.06)   \\
minority    &               &       0.034   &       0.097*  \\
            &               &      (0.05)   &      (0.04)   \\
disting     &               &               &       0.439***\\
            &               &               &      (0.06)   \\
cons       &       0.529***&       0.530***&       0.518***\\
            &      (0.03)   &      (0.03)   &      (0.02)   \\
\midrule
 N           &     196   &     196   &     196   \\          
R$^{2}$           &       0.001   &       0.003   &       0.235   \\
\bottomrule
\addlinespace[1ex]
\multicolumn{3}{l}{\textsuperscript{***}$p<0.01$, 
  \textsuperscript{**}$p<0.05$, 
  \textsuperscript{*}$p<0.1$}
\end{tabular}
\end{table}

\end{document}

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

以下に別の可能性を示しますctableパッケージ; 上付き文字の幅を指定するためにいくつかのボックスを使用しました:

\documentclass{article}
\usepackage{ctable}
\usepackage{booktabs}

\begin{document}

\ctable[
  notespar,
  caption={Dependent Variable: Enrollment}
]{c c c c}
{\tnote[*]{$p<0.1$}\tnote[**]{$p<0.5$}\tnote[***]{$p<0.01$}}{
\toprule
\textbf{Variable} & \textbf{Model 1} & \textbf{Model 2} & \textbf{Model 3}\\ 
\midrule
frl         &      -0.012   &      -0.052   &      -0.156\tmark[{\makebox[0pt][l]{**}}] \\
            &      (0.04)   &      (0.06)   &      (0.06)   \\
minority    &               &       0.034   &       0.097\tmark[{\makebox[0pt][l]{*}}]  \\
            &               &      (0.05)   &      (0.04)   \\
disting     &               &               &       0.439\tmark[{\makebox[0pt][l]{***}}]\\
            &               &               &      (0.06)   \\
cons       &       0.529\tmark[{\makebox[0pt][l]{***}}]&       0.530\tmark[{\makebox[0pt][l]{***}}]&       0.518\tmark[{\makebox[0pt][l]{***}}]\\
            &      (0.03)   &      (0.03)   &      (0.02)   \\
\midrule  
N           &     196   &     196   &     196   \\          
R$^{2}$           &       0.001   &       0.003   &       0.235   \\
\bottomrule}

\end{document}

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

booktabsまたは がない場合ctable、次のようなことができます。

\documentclass{article}
\usepackage{booktabs}

\begin{document}

\begin{table}[htbp]\centering
\caption{Dependent Variable: Enrollment}
\begin{tabular}{c c c c}
\hline\hline
\textbf{Variable} & \textbf{Model 1} & \textbf{Model 2} & \textbf{Model 3}\\ 
\hline
frl         &      -0.012   &      -0.052   &      -0.156** \\
            &      (0.04)   &      (0.06)   &      (0.06)   \\
minority    &               &       0.034   &       0.097*  \\
            &               &      (0.05)   &      (0.04)   \\
disting     &               &               &       0.439***\\
            &               &               &      (0.06)   \\
cons       &       0.529***&       0.530***&       0.518***\\
            &      (0.03)   &      (0.03)   &      (0.02)   \\
\hline
 N           &     196   &     196   &     196   \\          
R$^{2}$           &       0.001   &       0.003   &       0.235   \\
\hline
\\[-1.75ex]
\multicolumn{3}{l}{\textsuperscript{***}$p<0.01$, 
  \textsuperscript{**}$p<0.05$, 
  \textsuperscript{*}$p<0.1$}
\end{tabular}
\end{table}

\end{document}

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

答え2

がセルの最初の要素であるtabular限り、の下部にコンテンツを追加しても問題ありません。\multicolumn

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

\documentclass{article}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\begin{document}

\begin{table}[htbp]
  \centering
  \caption{Dependent Variable: Enrollment}
  \begin{tabular}{c r@{}l r@{}l r@{}l}
    \toprule
    \textbf{Variable} & 
      \multicolumn{2}{c}{\textbf{Model 1}} & 
      \multicolumn{2}{c}{\textbf{Model 2}} & 
      \multicolumn{2}{c}{\textbf{Model 3}} \\
    \midrule
    frl         &  $-$0&.012   &  $-$0&.052   &  $-$0&.156\textsuperscript{**}  \\
                &    (0&.04)   &    (0&.06)   &    (0&.06)    \\
    minority    &      &       &     0&.034   &     0&.097\textsuperscript{*}   \\
                &      &       &    (0&.05)   &    (0&.04)    \\
    disting     &      &       &      &       &     0&.439\textsuperscript{***} \\
                &      &       &      &       &    (0&.06)    \\
    cons        &     0&.529\textsuperscript{***}&     0&.530\textsuperscript{***}&     0&.518\textsuperscript{***} \\
                &    (0&.03)   &    (0&.03)   &    (0&.02)    \\
    \midrule
    N           &   196&       &   196&       &   196&        \\          
    R$^{2}$     &     0&.001   &     0&.003   &     0&.235    \\
  \bottomrule
  \multicolumn{3}{l}{\rule{0pt}{1.2\normalbaselineskip}% strut
    \textsuperscript{***}$p < 0.01$, 
    \textsuperscript{**}$p < 0.05$, 
    \textsuperscript{*}$p < 0.1$} 
  \end{tabular}
\end{table}

\end{document}

\textsuperscript一貫性を保つために、テーブルの下のコンポーネントを参照するために を使用している場合は、項目でも を使用する必要があります。さらに、コンテンツを小数点で\textsuperscript揃えることもできます(上記で行ったように、poor-man's列を使用しています)。tabularD

答え3

データ列に小数点付きの数値が含まれている場合、数値が小数点に揃っていると、読者にとって非常に役立ちます。これは、パッケージを使用してdcolumn適切な小数点スタイルの列タイプを定義することで実現できます。この方法を使用することの副次的な利点は、-負の数に付加された記号が、短い「ダッシュ」ではなく、適切な数学的な「マイナス」記号としてタイプセットされることです。

以前の回答ですでに指摘されているように、(i) 情報をステートメントで囲むことで、標準誤差と有意水準に関する凡例を表の下部の行に配置することができます。また、(ii) 適切な間隔の水平線を取得するために、代わりにパッケージとそのコマンド、など\multicolumn{4}{l}{...}を使用することもできます。booktabs\toprule\midrule

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

\documentclass{article}
\usepackage{booktabs,dcolumn}
\newcolumntype{d}{D{.}{.}{2.5}}           % alignment on decimal marker
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % shorthand macro
\begin{document}
\begin{table}
\centering
\caption{Dependent Variable: Enrollment}
\begin{tabular}{l ddd}
\toprule
\textbf{Regressor}       & \mc{\textbf{Model 1}} 
&  \mc{\textbf{Model 2}} & \mc{\textbf{Model 3}} \\
\midrule
frl        & -0.012   & -0.052   &      -0.156^{**} \\
           & (0.04)   & (0.06)   &      (0.06)      \\
minority   &          &  0.034   &       0.097^{*}  \\
           &          & (0.05)   &      (0.04)      \\
disting    &          &          &       0.439^{***}\\
           &          &          &      (0.06)      \\
cons       &  0.529^{***}& 0.530^{***}&  0.518^{***}\\
           & (0.03)      &(0.03)      &  (0.02)     \\
\midrule
$N$        & \mc{196} & \mc{196} &    \mc{196}   \\
$R^{2}$    &  0.001   &  0.003   &       0.235   \\
\midrule[\heavyrulewidth]
\multicolumn{4}{l}{(Standard errors in parentheses)}\\
\multicolumn{4}{l}{$^{***}\ p<0.01$; $^{**}\ p<0.05$; $^{*}\ p<0.1$}\\
\end{tabular}
\end{table}
\end{document} 

関連情報