Is there a way to make a table more compact? In term of the spacing between the line smaller, make the table more compact and look more professional.
MY MWE:
\documentclass[12pt,oneside]{book}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, multirow, tabularx,
threeparttable, tabulary}
\renewcommand\theadfont{\small\bfseries} % for bold in table using \small
\renewcommand\theadgape{}
\usepackage[svgnames, table]{xcolor}
\usepackage{siunitx} %for table spacing to second row
\usepackage{graphicx}
\usepackage[font=small,
labelfont={bf,sf}, textfont={sf},
justification=centering]{caption}
\begin{document}
\begin{table}[h!]
\centering
\sisetup{table-number-alignment=center}
\begin{tabularx}{\textwidth}{l>{\raggedright\arraybackslash}XcS[table-format=-1.5]S[table-format=1.5]}
\toprule
& & & {\thead{Statistic}}& {\thead{Std. Error}} \\
\midrule
\multirow{18}{*}{Difference\tnote{*}} & Mean
& & 43.3329 & 5.238 \\
\cmidrule{2-5}
& \multirow{2.4}{=}{95\% Confidence Interval for Mean} & Lower Bound & 31.4839 & \\
\cmidrule{3-5}
& & Upper Bound & \ 55.1818 \\
\cmidrule{2-5}
& 5\% Trimmed Mean & & 43.3857 \\
\cmidrule{2-5}
& Median & & 45.2381 \\
\cmidrule{2-5}
& Variance & & 274.3570 \\
\cmidrule{2-5}
& Std. Deviation & & 16.5637 \\
\cmidrule{2-5}
& Minimum & & 19.0476 \\
\cmidrule{2-5}
& Maximum & & 66.6667 \\
\cmidrule{2-5}
& Range & & 47.6190 \\
\cmidrule{2-5}
& Interquartile Range & & 30.9512 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}



\cmidrulefrom thebooktabspackage. This (and the other lines from said package) comes with a little bit of white space around them to prevent overlapping with the text. You can see the difference if you replace one of the\cmidrulecommands with a\cline. With the latter command, there will be less space between teh text and the line, making the table look more cramped. – leandriis Feb 11 '20 at 22:02\cmidrulecommands. – leandriis Feb 11 '20 at 22:03table-formataccording to the entries in your table. Usingtable-format=-1.5as currently will result in overfull box warnings and a slightly off alignment of the corresponding column(s). – leandriis Feb 11 '20 at 22:05\cmidruleto\cline, it seemed the text a bit overlap, and tooo cramped. Very hard to make decision. – aan Feb 11 '20 at 22:06\toprule,\midrulebelow the headings and the\bottomrulebelow the table. – leandriis Feb 11 '20 at 22:07