I would like to adjust the columns width. My table have 15 columns, I tried tabularx but it sent me an error. Any help or advice please.
\documentclass[a4paper,12pt,oneside,french]{book}
\usepackage[small,pagestyles, clearempty, explicit]{titlesec}
\usepackage{fourier, erewhon, cabin}
\usepackage{microtype}
\usepackage{eqparbox}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[french=guillemets]{csquotes}
\usepackage{textcomp}
\usepackage{calligra}
\usepackage[cyr]{aeguill}
\usepackage{fancyheadings}
\usepackage{titlesec}
\usepackage{multirow}
\usepackage{array,makecell,booktabs,rotating,ltablex}
\usepackage[detect-all]{siunitx}
\usepackage[referable]{threeparttablex}
\usepackage{lscape}
\usepackage{IEEEtrantools}
\usepackage{amssymb,amsmath,bm,amsthm,amscd,ragged2e,booktabs,changepage}
\usepackage{mathrsfs}
\usepackage{csquotes}
\usepackage{adjustbox}
\usepackage{graphicx}
\usepackage[top=2.5cm,bottom=2.5cm,headsep=1cm,right=2cm,vscale=0.75]{geometry}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}}
\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}
\begin{document}
\begin{table}
\centering\footnotesize
\caption{Régression des rendements sur facteur}
\label{sent-125}{\textbf{Estimation du Pouvoir Prédictif du facteur }} \\
\begin{tabularx}{\linewidth}{c*{14}{Y}}
\multicolumn{14}{l}{Régression de l’excès de rendement du marché (S\&P500 EW) sur le facteur d’une période :} \\
\multicolumn{14}{c}{\begin{equation*}r_{t} = \alpha+ + \epsilon_{t}\end{equation*}}\\
\multicolumn{14}{l}{La fréquence des données est mensuelle. $r_t$ dénote le rendement en excès du marché calculé sur l’indice composite S\&P500, }\\
\toprule
~ ~ & \mc{$\hat{\beta}_{S}$} &\mc{$\hat{\beta}_{H}$} & \mc{$\hat{\beta}_{L}$} & \mc{$\hat{\beta}_{UM}$} & \mc{$\hat{\beta}_{CI}$} & \mc{$\hat{\beta}_{FS}$} & \mc{$\hat{\beta}_{V}$} & \mc{$\hat{\beta}_{AA}$} & \mc{$\hat{\beta}_{II}$} & \mc{$\hat{\beta}_{CR}$} & \mc{$\hat{\beta}_{M}$} & \mc{$\hat{\beta}_{SENT1}$} & \mc{$\hat{\beta}_{SENT2}$} & \mc{$\hat{\beta}_{SENT3}$} \\
\midrule
~smb & 7.396 & 7.379 & 2.860 & 0.447 & 6.984 & 38.767** & -13.809* & -7.895 & 5.046 & -16.538** & 24.787* & -8.723 & -16.538** & 40.769** \\
~ & (1.301) & (1.299) & (0.475) & (0.064) & (1.203) & (2.133) & (-1.917) & (-1.048) & (0.842) & (-2.052) & (1.794) & (-1.165) & (-2.052) & (2.367) \\
~hml & 5.589 & 5.611 & 3.327 & 5.524 & 5.818 & 40.218** & 31.466*** & 26.401*** & 4.901 & 36.569*** & 46.869*** & 29.023*** & 36.569*** & 40.416** \\
~ & (0.690) & (0.693) & (0.383) & (0.595) & (0.711) & (2.360) & (3.212) & (2.618) & (0.583) & (3.548) & (3.517) & (2.889) & (3.548) & (2.466) \\
~RMW & -0.307*** & -0.288*** & -0.312*** & -0.338*** & -0.287*** & -1.234*** & -0.580*** & -0.496*** & -0.296*** & -0.684*** & -0.811*** & -0.513*** & -0.684*** & -1.169*** \\
~ & (-3.848) & (-3.613) & (-3.707) & (-3.768) & (-3.593) & (-4.503) & (-6.304) & (-5.101) & (-3.622) & (-6.664) & (-4.444) & (-5.323) & (-6.664) & (-4.344) \\
~CMA & -0.820*** & -0.799*** & -0.884*** & -0.785*** & -0.835*** & -0.495 & -0.814*** & -0.859*** & -0.825*** & -0.708*** & -0.500** & -0.884*** & -0.708*** & -0.531* \\
~ & (-7.292) & (-7.080) & (-7.442) & (-6.130) & (-7.356) & (-1.605) & (-6.376) & (-6.372) & (-6.934) & (-5.224) & (-2.174) & (-6.612) & (-5.224) & (-1.771) \\
~umd & -12.971*** & -12.961*** & -13.173*** & -10.169** & -12.666*** & -11.162 & -16.585*** & -13.009*** & -13.482*** & -17.187*** & -9.915 & -11.852** & -17.187*** & -4.792 \\
~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& 1.117 & 0.709** & 0.957*** & 1.010*** & 0.619 \\
~ & (5.536) & (5.462) & (3.666) & (0.283) & (2.109) & (1.611) & (2.043) & (1.382) & (2.404) & (1.150) & (2.534) & (4.704) & (4.500) & (1.584) \\
~Obs. & 618 & 618 & 530 & 479 & 610 & 90 & 335 & 365 & 582 & 266 & 144 & 365 & 266 & 90 \\
~R-squared & 0.184 & 0.185 & 0.211 & 0.177 & 0.188 & 0.463 & 0.288 & 0.228 & 0.188 & 0.323 & 0.394 & 0.240 & 0.323 & 0.488 \\
\multicolumn{15}{l}{~} \\
\bottomrule
\multicolumn{14}{l}{T-values are in parenthesis} \\
\multicolumn{14}{l}{*** p\textless{}0.01, ** p\textless{}0.05, * p\textless{}0.1}
\end{tabularx}
\end{table}
\end{document}
landscape
environment and adopt the syntax oflongtable
(no table environment,caption
in the\firsthead section) Also, no
\centering: this is automatic. Unrelated:
fancyheadings` should be replaced withfancyhdr
. The former has been obsolete for more than 30 years. Alsoaeguill
shouldn't be used any more.\multicolumn{14}{c}{\begin{equation*}r_{t} = \alpha+ + \epsilon_{t}\end{equation*}}
the columnc
is hmode, like\mbox
so can not have display math environments