Hi I am trying to change the font size of the caption (i.e., Descriptive Statistics and Correlations for Variables), but it keeps failing to do so:
\begin{table}[htb]
\captionsetup{font=scriptsize}
\caption{Descriptive Statistics and Correlations for Variables}
\begin{tabularx}{\linewidth}{l*{5}{Y}}
\toprule
\multicolumn{5}{l}{\textbf{Panel A: Descriptive Statistics}} \\
\midrule
Variable & \textbf{(1)} & \textbf{(2)} & \textbf{(3)}& \textbf{(4)} & \textbf{(5)} \\\hline \\
\textbf{Treat $\cdot$ Post} &\ 0.005& 0.005 &0.004&0.004&0.004 \\
&\ [3.20]&[3.11]&[3.76]&[3.00]&[3.12]\\
\textbf{Post} &-0.003& -0.003 & -0.002&-0.003 &-0.003 \\
&[-5.62]&[-3.04] &[-3.79] &[-2.88]&[-3.88]\\
\textbf{Treat} & &&-0.002&-0.002 \\
&&& [-2.35]& [-1.70]\\ \\
\textbf{R-squared} &0.50&0.56&0.42&0.44 &0.54 \\\hline
\end{tabularx}
\begin{tabularx}{\linewidth}{l*{5}{Y}}
\toprule
\multicolumn{5}{l}{\textbf{Panel B: Correlations}} \\
\midrule
Variable & \textbf{(1)} & \textbf{(2)} & \textbf{(3)}& \textbf{(4)} & \textbf{(5)} \\\hline \\
\textbf{Treat $\cdot$ Post} &\ 0.005& 0.005 &0.004&0.004&0.004 \\
&\ [3.20]&[3.11]&[3.76]&[3.00]&[3.12]\\
\textbf{Post} &-0.003& -0.003 & -0.002&-0.003 &-0.003 \\
&[-5.62]&[-3.04] &[-3.79] &[-2.88]&[-3.88]\\
\textbf{Treat} & &&-0.002&-0.002 \\
&&& [-2.35]& [-1.70]\\ \\
\textbf{R-squared} &0.50&0.56&0.42&0.44 &0.54 \\\hline
\bottomrule
\end{tabularx}
[1]\ Footnote 1: Variable~1 is calculated as\ldots \endgraf
[2]\ Correlations are Pearson.
\end{table}
Best Answer
You should check into whether you've loaded the
caption
package correctly.In addition, you really ought to give some thought to reorganizing the tabular material to make it more easily comprehensible for your readers. To this effect, you should simplify the overall layout, get rid of the bold-facing (unless you want to convey to your readers that you're possessed by an irrepressible need to SHOUT at them), and you should align the numbers on their respective decimal markers. And, since there's no question of allowing automatic line breaks in the numeric columns, you should probably be using one
tabular*
environment instead of two [2!]tabularx
environments.Last but not least, you should thoroughly re-examine the reason for wishing to render the table's caption in
\scriptsize
. With all the shouting you seem to be intent on doing in the body of the table, why would you want to hide the caption?