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}
\usepackage{tabularx,caption,booktabs}
and\newcolumntype{Y}{>{\centering\arraybackslash}X}
to a preamble, I (a) experience no problem compiling your code and (b) obtain a script-size caption header. Please tell us more about your document setup. – Mico Jul 25 '17 at 6:36