
1 週間前、修士論文を LaTeX で書こうと決めました。ゼロから始めました。あなたとこのフォーラムのおかげで、すべてを学ぶことができました。どうか寛大に、私のコードを笑わないでください :-) そこで、3 つのサブテーブルを持つテーブルを作成しようとしています。問題は次のとおりです。
- 最初のサブテーブルの最後の列が長すぎます。これは、最後の行の文章が非常に長いことが原因だと思います。幅を変更する方法が見つかりません。
- この幅を変更するには、tabular、tabularx、tabular* のどれを使用すればよいかわかりません。tabularx とサブキャプションでさまざまなことを試しましたが、何も機能しませんでした。
- 3 つのサブテーブルの幅を同じにしたいと思います。
- a)、b)、c) を各サブテーブルの上や中央に配置するのではなく、左側に「固定効果」に合わせて配置したいと思います。
これが私のコードです:
\usepackage{graphicx}
\usepackage[french,english]{babel}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{subcaption}
\begin{document}
\renewcommand{\thetable}{\arabic{table}}
\begin{table}[]
\caption{A first very long sentence. a) Name of my first subtable. b) Name of my second subtable. c) Name of my third subtable.}
\scriptsize
\centering
\begin{subtable}{0.9\textwidth}
\centering
\subcaption{}
\begin{tabular}{l c c c c}
\cline{1-5}
Fixed effects & \multicolumn{1}{c}{Estimate $\pm$ SE} & \multicolumn{2}{c}{Z} & \multicolumn{1}{r}{P} \\
\cline{1-5}
(Intercept) & \multicolumn{1}{c}{-0.27 $\pm$ 0.13} & \multicolumn{2}{c}{-2.10} & \multicolumn{1}{r}{0.036} \\
Trial & \multicolumn{1}{c}{0.00 $\pm$ 0.05} & \multicolumn{2}{c}{0.04} & \multicolumn{1}{r}{0.965} \\
\cline{1-5}
Random effects & \multicolumn{1}{c}{Variance $\pm$ SD} & \multicolumn{1}{c}{LRT} & \multicolumn{1}{c}{d.f.} & \multicolumn{1}{r}{P} \\
\cline{1-5}
Bird (intercept) & \multicolumn{1}{c}{0.55 $\pm$ 0.74} & \multicolumn{1}{r}{159} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{< 0.001} \\
Bird (slope with trial) & \multicolumn{1}{c}{0.02 $\pm$ 0.16} & \multicolumn{1}{r}{1.40} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{0.237} \\
Flock (intercept) & \multicolumn{1}{c}{0.00 $\pm$ 0.00} & \multicolumn{1}{r}{0} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{1} \\
\cline{1-5}
\multicolumn{5}{l}{\multirow{2}{\linewidth}{N = 454. The response variable is the proportion of scrounged patches, expressed as a 2-column matrix composed of the number of scrounged patches and number of produced patches.}} \\
\multicolumn{5}{l}{} \\
\end{tabular}
\label{tbl:sub-table-a}
\end{subtable}
\begin{subtable}{0.9\textwidth}
\centering
\subcaption{}
\begin{tabular}{l c c c c}
\cline{1-5}
Fixed effects & \multicolumn{1}{c}{Estimate $\pm$ SE} & \multicolumn{2}{c}{Z} & \multicolumn{1}{r}{P} \\
\cline{1-5}
(Intercept) & \multicolumn{1}{c}{-0.26 $\pm$ 0.19} & \multicolumn{2}{c}{-1.39} & \multicolumn{1}{r}{0.166} \\
Trial & \multicolumn{1}{c}{0.04 $\pm$ 0.09} & \multicolumn{2}{c}{0.44} & \multicolumn{1}{r}{0.659} \\
\cline{1-5}
Random effects & \multicolumn{1}{c}{Variance $\pm$ SD} & \multicolumn{1}{c}{LRT} & \multicolumn{1}{c}{d.f.} & \multicolumn{1}{r}{P} \\
\cline{1-5}
Bird (intercept) & \multicolumn{1}{c}{0.60 $\pm$ 0.77} & \multicolumn{1}{r}{81.2} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{< 0.001} \\
Bird (slope with trial) & \multicolumn{1}{c}{0.05 $\pm$ 0.22} & \multicolumn{1}{r}{1.68} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{0.194} \\
Flock (intercept) & \multicolumn{1}{c}{0.00 $\pm$ 0.00} & \multicolumn{1}{r}{0} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{1} \\
\cline{1-5}
\multicolumn{5}{l}{N = 234.} \\
\end{tabular}
\label{tbl:sub-table-b}
\end{subtable}
\begin{subtable}{0.9\textwidth}
\centering
\subcaption{}
\begin{tabular}{l c c c c}
\cline{1-5}
Fixed effects & \multicolumn{1}{c}{Estimate $\pm$ SE} & \multicolumn{2}{c}{Z} & \multicolumn{1}{r}{P} \\
\cline{1-5}
(Intercept) & \multicolumn{1}{c}{-0.27 $\pm$ 0.17} & \multicolumn{2}{c}{-1.57} & \multicolumn{1}{r}{0.117} \\
Trial & \multicolumn{1}{c}{-0.03 $\pm$ 0.07} & \multicolumn{2}{c}{-0.42} & \multicolumn{1}{r}{0.674} \\
\cline{1-5}
Random effects & \multicolumn{1}{c}{Variance $\pm$ SD} & \multicolumn{1}{c}{LRT} & \multicolumn{1}{c}{d.f.} & \multicolumn{1}{r}{P} \\
\cline{1-5}
Bird (intercept) & \multicolumn{1}{c}{0.50 $\pm$ 0.71} & \multicolumn{1}{r}{77.5} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{< 0.001} \\
Bird (slope with trial) & \multicolumn{1}{c}{0.01 $\pm$ 0.10} & \multicolumn{1}{r}{0.17} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{0.682} \\
Flock (intercept) & \multicolumn{1}{c}{0.00 $\pm$ 0.00} & \multicolumn{1}{r}{0} & \multicolumn{1}{c}{1} & \multicolumn{1}{r}{1} \\
\cline{1-5}
\multicolumn{5}{l}{N = 220.} \\
\end{tabular}
\label{tbl:sub-table-c}
\end{subtable}
\label{tab:scrounging}
\end{table}
\end{document}
答え1
順不同のいくつかの提案:
間隔の広い水平線を得るには、や の代わりに、
booktabs
パッケージの線描画マクロ(\toprule
、など) を使用します。\midrule
\hline
\cline
を使用すると
\scriptsize
、読者は目を細めて、他の資料に飛ばしたくなる可能性があります。\footnotesize
読者が表形式の資料を読むのに時間を費やすことを期待する場合は、それより下には行かないでください。0.7\textwidth
3 つの環境それぞれに共通の幅 ca を使用し、3 つの環境すべてが同じ幅になるsubtable
ようにします。これは、各環境の最終行にディレクティブを使用することで実現できます。tabular
p{\textwidth}
tabular
\multicolumn
4 つのデータ列に「スマート」な、具体的には自動数式モード列を設定することで、環境本体での入力を大幅に節約できます (これらのディレクティブはすべて古くなってきています...tabular
)。以下の序文で、列タイプC
とR
列タイプがどのように定義されているかを確認してください。環境のキャプションを左揃えにするには
subtable
、次のような命令を実行します。\captionsetup[subtable]{singlelinecheck=false,justification=raggedright}
埋め込み環境と同じフォント サイズをキャプションにも使用してください
tabular
。(コードの) 宝探しをするのが好きでない限り、
\caption
および関連する\label
ディレクティブを一緒に保管してください。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[french,english]{babel}
\usepackage{amsmath,multirow}
\usepackage{booktabs,array,subcaption}
\newcolumntype{C}{>{$}c<{$}}
\newcolumntype{R}{>{$}r<{$}}
\begin{document}
\renewcommand{\thetable}{\arabic{table}}
\begin{table}
\footnotesize
\captionsetup[subtable]{size=footnotesize,
singlelinecheck=false,
justification=raggedright}
\caption{A first very long sentence. a) Name of my first subtable.
b) Name of my second subtable.
c) Name of my third subtable.}
\label{tab:scrounging}
\centering % a single \centering instruction suffices
\begin{subtable}{0.7\textwidth}
\caption{} \label{tbl:sub-table-a}
\begin{tabular}{@{}lCRCR@{}}
\toprule
Fixed effects & \text{Estimate} \pm \text{SE} & \multicolumn{2}{C}{Z} & P \\
\midrule
(Intercept) & -0.27 \pm 0.13 & \multicolumn{2}{C}{-2.10} & 0.036 \\
Trial & \phantom{-}0.00 \pm 0.05 & \multicolumn{2}{C}{\phantom{-}0.04} & 0.965 \\
\midrule
Random effects & \text{Variance} \pm \text{SD} & \text{LRT} & \text{d.f.} & P \\
\midrule
Bird (intercept) & 0.55 \pm 0.74 & 159 & 1 & < 0.001 \\
Bird (slope with trial) & 0.02 \pm 0.16 & 1.40 & 1 & 0.237 \\
Flock (intercept) & 0.00 \pm 0.00 & 0 & 1 & 1 \\
\midrule
\multicolumn{5}{@{}p{\textwidth}@{}}{$N = 454$. The response variable is
the proportion of scrounged patches, expressed as a 2-column matrix
composed of the number of scrounged patches and number of produced patches.} \\
\end{tabular}
\end{subtable}
\bigskip % insert some space between the subtables
\begin{subtable}{0.7\textwidth}
\subcaption{} \label{tbl:sub-table-b}
\begin{tabular}{@{}lCRCR@{}}
\toprule
Fixed effects & \text{Estimate} \pm \text{SE} & \multicolumn{2}{C}{Z} & P \\
\midrule
(Intercept) & -0.26 \pm 0.19 & \multicolumn{2}{C}{-1.39} & 0.166 \\
Trial & \phantom{-}0.04 \pm 0.09 & \multicolumn{2}{C}{\phantom{-}0.44} & 0.659 \\
\midrule
Random effects & \text{Variance} \pm \text{SD} & \text{LRT} & \text{d.f.} & P \\
\midrule
Bird (intercept) & 0.60 \pm 0.77 & 81.2 & 1 & < 0.001 \\
Bird (slope with trial) & 0.05 \pm 0.22 & 1.68 & 1 & 0.194 \\
Flock (intercept) & 0.00 \pm 0.00 & 0 & 1 & 1 \\
\midrule
\multicolumn{5}{@{}p{\textwidth}@{}}{$N = 234$.} \\
\end{tabular}
\end{subtable}
\bigskip
\begin{subtable}{0.7\textwidth}
\subcaption{} \label{tbl:sub-table-c}
\begin{tabular}{@{}lCRCR@{}}
\toprule
Fixed effects & \text{Estimate}\pm\text{SE} & \multicolumn{2}{C}{Z} & P \\
\midrule
(Intercept) & -0.27 \pm 0.17 & \multicolumn{2}{C}{-1.57} & 0.117 \\
Trial & -0.03 \pm 0.07 & \multicolumn{2}{C}{-0.42} & 0.674 \\
\midrule
Random effects & \text{Variance}\pm\text{SD} & \text{LRT} & \text{d.f.} & P \\
\midrule
Bird (intercept) & 0.50 \pm 0.71 & 77.5 & 1 & < 0.001 \\
Bird (slope with trial) & 0.01 \pm 0.10 & 0.17 & 1 & 0.682 \\
Flock (intercept) & 0.00 \pm 0.00 & 0 & 1 & 1 \\
\midrule
\multicolumn{5}{@{}p{\textwidth}@{}}{$N = 220$.} \\
\end{tabular}
\end{subtable}
\end{table}
\end{document}
補遺OP の最初のフォローアップの質問に回答します。列間の「ギャップ」を均等にしたい場合は、tabular*
次のコードに示すように、環境を使用することをお勧めします。やや扱いにくいように見えるディレクティブ@{\extracolsep{\fill}}
directive は、LaTeX に列間の空白を増やして使用可能なスペースを埋めるように指示します。
共通の凡例をサブテーブルの上の場所に移動することもお勧めします。
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[french,english]{babel}
\usepackage{amsmath,booktabs,array,subcaption}
\newcolumntype{C}{>{$}c<{$}}
\newcolumntype{R}{>{$}r<{$}}
\begin{document}
\begin{table}
\captionsetup[subtable]{size=footnotesize,
skip=0.25\baselineskip,
singlelinecheck=false,
justification=raggedright}
\caption{A first very long sentence.
a) Name of my first subtable.
b) Name of my second subtable.
c) Name of my third subtable.}
\label{tab:scrounging}
\footnotesize
\bigskip
In the following tables, the response variable is the proportion of scrounged patches, expressed as a 2-column matrix composed of the number of scrounged patches and number of produced patches.
\centering % a single \centering instruction suffices
\setlength\tabcolsep{0pt} % let LaTeX figure out the intercolumn spacing
\bigskip
\begin{subtable}{0.7\textwidth}
\caption{} \label{tbl:sub-table-a}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lCRCR}
\toprule
Fixed effects & \text{Estimate} \pm \text{SE} & \multicolumn{2}{C}{Z} & P \\
\midrule
(Intercept) & -0.27 \pm 0.13 & \multicolumn{2}{C}{-2.10} & 0.036 \\
Trial & \phantom{-}0.00 \pm 0.05 & \multicolumn{2}{C}{\phantom{-}0.04} & 0.965 \\
\midrule
Random effects & \text{Variance} \pm \text{SD} & \text{LRT} & \text{d.f.} & P \\
\midrule
Bird (intercept) & 0.55 \pm 0.74 & 159 & 1 & < 0.001 \\
Bird (slope with trial) & 0.02 \pm 0.16 & 1.40 & 1 & 0.237 \\
Flock (intercept) & 0.00 \pm 0.00 & 0 & 1 & 1 \\
\midrule
$N = 454$. \\
\end{tabular*}
\end{subtable}
\bigskip % insert some space between the subtables
\begin{subtable}{0.7\textwidth}
\subcaption{} \label{tbl:sub-table-b}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lCRCR}
\toprule
Fixed effects & \text{Estimate} \pm \text{SE} & \multicolumn{2}{C}{Z} & P \\
\midrule
(Intercept) & -0.26 \pm 0.19 & \multicolumn{2}{C}{-1.39} & 0.166 \\
Trial & \phantom{-}0.04 \pm 0.09 & \multicolumn{2}{C}{\phantom{-}0.44} & 0.659 \\
\midrule
Random effects & \text{Variance} \pm \text{SD} & \text{LRT} & \text{d.f.} & P \\
\midrule
Bird (intercept) & 0.60 \pm 0.77 & 81.2 & 1 & < 0.001 \\
Bird (slope with trial) & 0.05 \pm 0.22 & 1.68 & 1 & 0.194 \\
Flock (intercept) & 0.00 \pm 0.00 & 0 & 1 & 1 \\
\midrule
$N = 234$. \\
\end{tabular*}
\end{subtable}
\bigskip
\begin{subtable}{0.7\textwidth}
\subcaption{} \label{tbl:sub-table-c}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lCRCR}
\toprule
Fixed effects & \text{Estimate}\pm\text{SE} & \multicolumn{2}{C}{Z} & P \\
\midrule
(Intercept) & -0.27 \pm 0.17 & \multicolumn{2}{C}{-1.57} & 0.117 \\
Trial & -0.03 \pm 0.07 & \multicolumn{2}{C}{-0.42} & 0.674 \\
\midrule
Random effects & \text{Variance}\pm\text{SD} & \text{LRT} & \text{d.f.} & P \\
\midrule
Bird (intercept) & 0.50 \pm 0.71 & 77.5 & 1 & < 0.001 \\
Bird (slope with trial) & 0.01 \pm 0.10 & 0.17 & 1 & 0.682 \\
Flock (intercept) & 0.00 \pm 0.00 & 0 & 1 & 1 \\
\midrule
$N = 220$. \\
\end{tabular*}
\end{subtable}
\end{table}
\end{document}
答え2
tabularx
およびを使用したソリューションsiunitx
:
\documentclass{book}
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage{lmodern}
\usepackage[french,english]{babel}
\usepackage{booktabs}
\usepackage{tabularx, siunitx}
\sisetup{table-number-alignment=center}
\usepackage{caption, subcaption}
\captionsetup{font=small}
\captionsetup[subtable]{singlelinecheck=off, font=footnotesize}
\begin{document}
\begin{table}[!htbp]
\caption{A first very long sentence. a) Name of my first subtable. b) Name of my second subtable. c) Name of my third subtable.}
\footnotesize\setlength{\tabcolsep}{3pt}
\centering
\begin{subtable}{0.65\textwidth}
\subcaption{}\label{tbl:sub-table-a}
\begin{tabularx}{\linewidth}{X S[table-format=-1.2, separate-uncertainty, table-figures-uncertainty=2] c c S[table-format=1.3, table-comparator]}
\toprule
Fixed effects & {Estimate $\pm$ SE} & \multicolumn{2}{c}{Z} & {P} \\
\midrule %
(Intercept) & -0.27(13) & \multicolumn{2}{c}{$-2.10 $} & 0.036 \\%
Trial & 0.00(05) & \multicolumn{2}{c}{$\phantom{-} 0.04 $} & 0.965 \\
\midrule
Random effects & {Variance $\pm$ SD} & LRT & d.f. & {P} \\
\midrule
Bird (intercept) & 0.55(74) & \multicolumn{1}{r}{159} & 1 & {}< 0.001 \\%
Bird (slope with trial) & 0.02(16) & \multicolumn{1}{r}{1.40} & 1 & 0.237 \\%
Flock (intercept) & 0.00(0) & \multicolumn{1}{r}{0} & 1 & {1} \\
\bottomrule
\addlinespace[1ex]
\multicolumn{5}{@{}p{\linewidth}@{}}{N = 454. The response variable is the proportion of scrounged patches, expressed as a 2-column matrix composed of the number of scrounged patches and number of produced patches.\medskip}
\end{tabularx}
\end{subtable}
\begin{subtable}{0.65\textwidth}
\subcaption{}\label{tbl:sub-table-b}
\begin{tabularx}{\linewidth}{X S[table-format=-1.2, separate-uncertainty, table-figures-uncertainty=2] c c S[table-format=1.3, table-comparator]}
\toprule
Fixed effects & {Estimate $\pm$ SE} & \multicolumn{2}{|c|}{Z} & {P} \\
\midrule %
(Intercept) & -0.26(19) & \multicolumn{2}{c}{$ -1.39 $} & 0.166 \\%
Trial & 0.00(05) & \multicolumn{2}{c}{$\phantom{-} 0.44 $} & 0.659 \\
\midrule
Random effects & {Variance $\pm$ SD} & LRT & d.f. & {P} \\
\midrule
Bird (intercept) & 0.60(77) & \multicolumn{1}{r}{81.2} & 1 & < 0.001 \\%
Bird (slope with trial) & 0.05(22) & \multicolumn{1}{r}{1.68} & 1 & 0.194 \\%
Flock (intercept) & 0.00(0) & \multicolumn{1}{r}{0} & 1 & {1} \\
\bottomrule
\addlinespace[1ex]
\multicolumn{5}{@{}p{\linewidth}@{}}{N =234.\medskip}
\end{tabularx}
\end{subtable}
\begin{subtable}{0.65\textwidth}
\subcaption{}\label{tbl:sub-table-c}
\begin{tabularx}{\linewidth}{X S[table-format=-1.2, separate-uncertainty, table-figures-uncertainty=2] c c S[table-format=1.3, table-comparator]}
\toprule
Fixed effects & {Estimate $\pm$ SE} & \multicolumn{2}{|c|}{Z} & {P} \\
\midrule %
(Intercept) & -0.27(17) & \multicolumn{2}{c}{$ -1.57 $} & 0.117 \\%
Trial & -0.03(07) & \multicolumn{2}{c}{$ -0.42 $} & 0.674 \\
\midrule
Random effects & {Variance $\pm$ SD} & LRT & d.f. & {P} \\
\midrule
Bird (intercept) & 0.50(71) & \multicolumn{1}{r}{77.5} & 1 & < 0.001 \\%
Bird (slope with trial) & 0.01(10) & \multicolumn{1}{r}{0.17} & 1 & 0.682 \\%
Flock (intercept) & 0.00(0) & \multicolumn{1}{r}{0} & 1 & {1} \\
\bottomrule
\addlinespace[1ex]
\multicolumn{5}{@{}p{\linewidth}@{}}{N =220.}
\end{tabularx}
\end{subtable}
\end{table}
\end{document}
答え3
編集:
部分的には正しいです :) 最後のmulticolum
行は幅が広すぎます。 これは で定義されlinewidth
、幅 で定義されますsubtable
。 これを 77 mm に短くすると、テーブルは希望どおりに表示されます。
位置に関しては、テーブルの左側に、テーブルの最初の行に合わせて配置したいとお考えだと理解しています。これは、 を使用し、の代わりに パッケージを使用するsubcaption
ことで実現できます。floatrow
subfig
subcaption
booktabs
今では、水平線にの存在を活用し、makecell
マクロを使用して列の見出しを定義するためにを追加しましたthead
。
すべてのサブテーブルの幅を均等にするには、規定の幅を持つテーブル環境をそのまま使用するのが賢明ですtabularx
。`tabulartabular*
を使用する方が簡単です。幅については、すべてのサブテーブルの幅を 1 か所で設定できる新しい長さ (以下の MWE を参照) を定義することをお勧めします。
適切なテーブル幅を見積もるには、ページ レイアウトを表示するパッケージを使用しますshowframe
。もちろん、最終ドキュメントでは、このパッケージをプリアンブルから削除する必要がありました。
話題外:multicolumn
あなたの表は不必要に複雑です。2列にまたがるものを除いて すべて削除します。また、フォント サイズが大きい表\script
は読みにくいので、もっと大きいフォントを使用することをお勧めします。
最初のテーブルのみを含む完全な新しい MWE は次のとおりです。
\documentclass{book}
\usepackage[french,english]{babel}
\usepackage{booktabs, makecell, tabularx}% <--- added makecell
\renewcommand\theadfont{\footnotesize}
\newcommand\mc[2]{\multicolumn{#1}{c}{#2}}
\newcommand\mr[1]{\multicolumn{1}{r}{#1}}
\newlength\tabwidth
\usepackage{floatrow}% <-- added for side position of subcaptions
\floatsetup[table]{style=plain,subcapbesideposition=top,capposition=top}
\usepackage{caption}
\usepackage[label font=bf,labelformat=parens]{subfig}
\usepackage{calc}% <-- added for calculation of cell width
\usepackage{showframe}
\renewcommand*\ShowFrameColor{\color{red}}
\begin{document}
\begin{table}[]
\caption{A first very long sentence. a) Name of my first subtable. b) Name of my second subtable. c) Name of my third subtable.}
\label{tbl:sub-table-a}
\centering
\setlength\tabwidth{90mm}
\footnotesize
\sidesubfloat[]{
\begin{tabularx}{\tabwidth}{X c c c r}
\toprule
\thead{Fixed effects}
& \thead{Estimate $\pm$ SE}
& \mc{2}{\thead{Z}} & \thead{P} \\
\midrule
(Intercept) & -0.27 $\pm$ 0.13 & \mc{2}{-2.10} & 0.036 \\
Trial & 0.00 $\pm$ 0.05 & \mc{2}{0.04} & 0.965 \\
\midrule
\thead{Random effects}
& \thead{Variance $\pm$ SD}
& \thead{LRT} & \thead{d.f.}
& \thead{P} \\
\midrule
Bird (intercept)& 0.55 $\pm$ 0.74 & \mr{159} & 1 & $<$ 0.001 \\
Bird (slope with trial)
& 0.02 $\pm$ 0.16 & \mr{1.40} & 1 & 0.237 \\
Flock (intercept)
& 0.00 $\pm$ 0.00 & \mr{0} & 1 & 1 \\
\midrule[1pt]
\multicolumn{5}{p{\tabwidth-2\tabcolsep}}{N = 454. The response variable is the proportion of scrounged patches, expressed as a 2-column matrix composed of the number of scrounged patches and number of produced patches.}
\end{tabularx}
}
\end{table}
\end{document}