I am currently experiencing some formatting issues with my table. I have conducted two separate regression analyses and now I would like to include them in one table since all the regression coefficients are the same. One table looks like this:
\documentclass[paper=a4, pagesize, fontsize=11pt]{scrartcl}
\usepackage{pdfpages}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{rotating,threeparttable,siunitx,tabularx,ragged2e,booktabs}
\newcolumntype{L}{>{\RaggedRight}X}
\begin{document}
\begin{sidewaystable}
\small %\footnotesize
\begin{threeparttable}[H]
\caption{Regressionstabelle -- Modell 1}
\label{tab:reg1}
%%\setlength{\tabcolsep}{5.5pt} % default: 6pt
\sisetup{table-format=-1.2} % set default format
\begin{tabularx}{\textheight}{@{}
L
S
S[table-format=1.2]
%>{\lbr}S[table-space-text-pre=\lbr]
%@{,\,} % comma rather than whitespace as column separator
S%[table-format=<.4, add-integer-zero=false]
S[table-format=<.4, add-integer-zero=false]
S[table-format=1.2]
S[table-format=<.4, add-integer-zero=false]
S[table-format=<.4, add-integer-zero=false] @{}}
\toprule
& \multicolumn{5}{c}{} \\
% \cmidrule(lr){2-6} \cmidrule(lr){7-7} %\cmidrule(l){8-9}
Latente Konstrukte & {$B$} & {SE} & {$z$}& {$p$}&$\gamma$ \\
\midrule
\emph{ Vitalität}&&&&&\\
Extraversion & 0.32 & 0.22 & 1.48 & 0.14 & 0.16\\
Verträglichkeit & 0.36 &0.23 &1.54 &0.12 &0.18\\
Gewissenhaftigkeit&0.18 &0.23 &0.78 &0.44 &0.10\\
Neurotizismus &1.32 &0.24 &5.53 & < .001 &0.99\\
Offenheit &-1.33 &1.42 &-0.94 &0.35 &-0.13\\
\addlinespace
\emph{ Psychisches Wohlbefinden}&&&&&\\
Extraversion &0.19 & 0.17 & 1.09 & 0.28 & 0.13\\
Verträglichkeit &0.34 &0.19 &1.77 &0.08 &0.24\\
Gewissenhaftigkeit&0.57 &0.20 &2.80 &0.01 &0.47\\
Neurotizismus &1.26 &0.23 &5.45 &< .001 &1.36\\
Offenheit &-1.19 &1.21 &-0.98 &0.33 &-0.17\\
\addlinespace
\emph{Allgemeine Gesundheitswahrnehmung}&&&&&\\
Extraversion & 0.28 & 0.17 & 1.64 & 0.10 & 0.19\\
Verträglichkeit & 0.40 &0.19 &2.11 &0.04 &0.27\\
Gewissenhaftigkeit&0.13 &0.18 &0.71 &0.48 &0.10\\
Neurotizismus &0.91 &0.20 &4.45 &<.001 &0.93\\
Offenheit &-0.63 &0.90 &-0.71 &0.48 &-0.08\\
\bottomrule
\end{tabularx}
\smallskip\scriptsize
\begin{tablenotes}
\item[\phantom{*}$*$] Modell 1: Schiefwinkeliges Modell unter Einschluss der Subskalen \emph{Schmerz} und \emph{Soziale Funktionsfähigkeit}
\item[$**$] Modell 2: Orthogonales Modell unter Ausschluss der Subskalen \emph{Schmerz} und \emph{Soziale Funktionsfähigkeit}
\end{tablenotes}
\end{threeparttable}
\end{sidewaystable}
\end{document}
Is there a way how I can move the columns where it says (B, SE, p, z etc. ) more to the left, so that I have enough space left to add those columns one more time for the results of the second regression analysis. Also, I would need to make one horizontal line above the first B, SE etc. columns and a second one for the next few columns so that I can write Regression 1 above the first horizontal line and regression 2 above the second one. Do you know what I mean? :=)
I hope that someone of you will be able to help me. Thanks already very much in advance.
All the best, Helena




! LaTeX Error: Environment sidewaystable undefined.– David Carlisle May 24 '20 at 19:00Lcolumn type defined? – Bernard May 24 '20 at 19:10booktabs,tbaularx,siunitx,rotatingandthreeparttablex. From the screenshot I would also guess that theLtype column is defined as follows:\newcolumntype{L}{>{\raggedright\arraybackslash}X}is that correct? – leandriis May 24 '20 at 19:27Ltype column is a variant of theXtype columns, you can simply add more columns and the first column's width will adapt automatically. (That's the whole purpose of theXtype column andtabularx). For the two horizontal lines, you can use\cmidrule. Probable\cmidrule(r){2-6} \cmidrule(l){7-11}does what you want. Please also take a look at thetable-formatoption of theStype columns and match them to the contents of the corresponding columns. (Currently your code results in a bunch of overfull box warnings that can be eliminated that way.) – leandriis May 24 '20 at 19:47