0

for some reasons my table header and caption are being pushed to the right, but the rest of the table is in the centre - any idea what's going on here?

\documentclass[a4paper, 12pt, doublespacing, nolistspacing, chapterinoneline, parskip, liststotoc]{article}

\usepackage{graphicx}
\usepackage{graphics}
\usepackage{rotating}
\usepackage{mathtools}
\usepackage{natbib}
\usepackage{adjustbox}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{wrapfig}
\usepackage{tabu}
\usepackage{booktabs} % \toprule
\usepackage{subcaption} % subcaption
\usepackage{siunitx} % S column type (align by decimal)
\sisetup{parse-numbers=false} % allow parentheses in number column

\usepackage[utf8]{inputenc} 
\usepackage{fullpage}
\usepackage[british]{babel} 
\usepackage{booktabs}
\usepackage{mathpazo} % font
\usepackage{pdflscape}
\usepackage{cmbright}
\usepackage[T1]{fontenc}
\usepackage{caption}
\usepackage{array}
\usepackage{multirow}
\usepackage{longtable,booktabs,threeparttablex,threeparttable}
\usepackage{siunitx}

\title{RAE}
\author{U1502015}
\date{\today}

\setlength{\parskip}{1em}
\setlength{\parindent}{0em} 

\newcommand{\rowgroup}[1]{\hspace{-1em}#1}

\begin{document}

\begin{longtable}[c]{lc}
\centering
\small
\caption{Estimates and standard errors of probit regression of binary EWEB on independent variables}\\
\hline
{} & \textbf{Binary EWEB}\\
\hline
\endfirsthead

\caption{Estimates and standard errors of probit regression of binary EWEB on independent variables - continued}\\
\hline
& \textbf{Binary EWEB}\\
\hline
\endhead

\hline    
\multicolumn{2}{r}{(\emph{Continued on next page...})}
\endfoot

\hline
\multicolumn{2}{l}{*** p<0.01, ** p<0.05, * p<0.1} \\
\endlastfoot

    \rowgroup{\textbf{Income (Linear)}} & \textbf{-0.250**} \\
          & (0.111) \\
    \rowgroup{\textbf{Income (Quadratic)} & \textbf{0.029**}} \\
          & (0.012) \\
    \rowgroup{\textbf{Income (Cubic)}} & \textbf{-0.001**} \\
          & (0.000) \\
    \rowgroup{\textbf{Relative Wealth}} & 0.126 \\
          & (0.079) \\
    \rowgroup{\textbf{Work-Life Balance (Linear)}} & 0.368 \\
          & (0.290) \\
    \rowgroup{\textbf{Work-Life Balance (Quadratic)}} & -0.041 \\
          & (0.033) \\
    \rowgroup{\textbf{Social Capital (Linear)}} & \textbf{1.333*} \\
          & (0.788) \\
    \rowgroup{\textbf{Social Capital (Quadratic)}} & \textbf{-0.258*} \\
          & (0.154) \\
    \rowgroup{\textbf{Injunctive Norm}} & -0.041 \\
          & (0.208) \\
    \rowgroup{\textbf{Descriptive Norm}} & \textbf{1.527***} \\
          & (0.543) \\
    \rowgroup{\textbf{Personal Norm}} & \textbf{0.998***} \\
          & (0.379) \\
    \rowgroup{\textbf{Descriptive Norm \# Personal Norm}} & \textbf{-1.569***} \\
          & (0.566) \\
          &  \\
    \rowgroup{\textbf{Age (Linear)}} & -0.027 \\
          & (0.043) \\
    \rowgroup{\textbf{Age (Quadratic)}} & 0.000 \\
          & (0.000) \\
    \rowgroup{\textbf{Female}} & -0.107 \\
          & (0.148) \\
    \rowgroup{\textbf{Heath}} & 0.256*** \\
          & (0.045) \\
    \rowgroup{\textbf{Non-White}} & -0.244 \\
          & (0.202) \\
    \rowgroup{\textbf{Highest Qualification}} &  \\ \\
    \textbf{GCSE level or equivalent} & -0.558 \\
          & (0.490) \\
    \textbf{A-levels or equivalent} & -0.414 \\
          & (0.467) \\
    \textbf{Undergraduate degree} & -0.318 \\
          & (0.462) \\
    \textbf{Masters degree} & -0.391 \\
          & (0.596) \\
    \textbf{PhD} & -0.010 \\
          & (0.574) \\
    \rowgroup{\textbf{Personality Traits}} &  \\ \\
    \textbf{Extraversion} & 0.071 \\
          & (0.054) \\
    \textbf{Agreeable} & -0.027 \\
          & (0.068) \\
    \textbf{Conscientious} & 0.009 \\
          & (0.089) \\
    \textbf{Neuroticism} & -0.169*** \\
          & (0.046) \\
    \textbf{Openness} & 0.025 \\
          & (0.081) \\
    \textbf{Optimistic} & 0.236*** \\
          & (0.065) \\
    \textbf{Adaptive} & 0.116** \\
          & (0.057) \\
  \label{tab:probit}%
\end{longtable}%
\end{document}
3
  • never ignore errors, after any error the PDF is not intended to be usable, just a possible debugging aid. This document produces ! Misplaced \noalign. \caption ->\noalign remove teh \small and \centering from before \caption. Jun 4, 2020 at 17:36
  • What is \rowgroup supposed to do here? It seems to shift the text to the left resulting in the text in the first column starting left of the start of the \hline. If you want text and line to start at the same horizontal position, remove \rowgroup and use \begin{longtable}[c]{@{}lc} (or \begin{longtable}[c]{@{}lc@{}}) instead.
    – leandriis
    Jun 4, 2020 at 17:44
  • 1
    I would recommend to not use \textbf for every single entry in the first column. If you nevertheless which to keep that, you could use \begin{longtable}[c]{<{\bfseries}lc} ( or \begin{longtable}[c]{@{}<{\bfseries}lc} in combination with my previous comment) in order to avoid repeating \textbf over and over again.
    – leandriis
    Jun 4, 2020 at 17:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.