# Misplaced omit error in table

I have been looking for an answer (in this site and others) for about three hours, commented out the vast majority of my code, and I still have no answer to my issue. I have a table which returns multiple misplaced \omit and misplaced \span errors. Why is this happening? It must be something very silly, I guess. This is my code:

    \documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{eurosym}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{caption}
\usepackage{xcolor}
\usepackage{amsmath}
\def\sym#1{\ifmmode{}^{#1}\else$${}^{#1}$$\fi}
\begin{document}
\begin{center}
%TCIMACRO{%
%\TeXButton{B}{\def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi}
%\begin{table}[h]\centering}}%
%BeginExpansion
\begin{table}[h]\centering%
%EndExpansion
\caption{Heterogeneous effect - The role of confidence} \label%
{tab:regression2}%
\begin{tabular}{lcccc}
\hline\hline
& Placement & Placement & Placement & Placement \\
& {\small {Model E}} & {\small {Model F}} & {\small {Model G}} & {\small {%
Model H }} \\ \hline
Treatment 1 & -10.61\sym{**} &  & -2.811 & 0 \\
& (0.048) &  & (0.677) & ($\cdot$) \\[1em]
Sample Score &  & 4.332\sym{***} & 3.813\sym{*} & 4.332\sym{***} \\
&  & (0.007) & (0.061) & (0.007) \\[1em]
Treat.1 $X$ Sample Score & 7.005\sym{***} & 2.064\sym{**} & 3.245 &
2.064\sym{**} \\
& (0.002) & (0.046) & (0.283) & (0.046) \\[1em]
Male & 5.031\sym{**} & 4.526\sym{*} & 4.524\sym{*} & 4.526\sym{*} \\
& (0.032) & (0.054) & (0.054) & (0.054) \\
Constant & 54.57\sym{***} & 46.17\sym{***} & 47.40\sym{***} & 46.17\sym{***} \\ %
& (0.000) & (0.000) & (0.000) & (0.000) \\ \hline\hline
N & 282 & 282 & 282 & 282 \\
$R^{2}$ & 0.0648 & 0.0761 & 0.0767 & 0.0761 \\ \hline\hline
\end{tabular}%
\smallskip

\multicolumn{4}{p{0.85\linewidth}}{\footnotesize NOTES: The dependent variable is placement (the reported belief that own performance in the quiz is above the median). Models E-G are OLS regressions. Model H is a semi-structural estimation imposing the model's restriction that Treatment $1>0$. \textit{P}-values in parentheses. \sym{*} $$p<0.10$$, \sym{**} $$p<0.10$$, \sym{***} $$p<0.10$$.} \\
%TCIMACRO{\TeXButton{E}{\end{table}}}%
%BeginExpansion
\end{table}%
\end{center}
\end{document}


I know the spacing is bad but it should work. Please note that a colleague of mine uses Scientific Workplace, which has serious compatibility issues. That is why I use the multicolumn after the \end{tabular} and I avoid using packages such as booktabs.

• But \multicolumn can't go outside a tabular environment. I think you can replace \multicolumn{4}{p{0.85\linewidth}} by \parbox{0.85\linewidth} or something like that to achieve the same effect. – Phelype Oleinik Aug 12 at 20:53
• Well, I swear I took the advice of putting the multicolumn outside the tabular from a great answer somewhere in another question, a few weeks ago. I cannot find it now... Anyways, your suggestion works perfectly. Thank you. – Juan Pedro Aug 12 at 21:02
• Maybe you could ues the threeparttable package as shown in my answer to one of your previous questions: tex.stackexchange.com/a/502001/134144 – leandriis Aug 12 at 21:51

You have

 \multicolumn{4}{p{0.85\linewidth}}{\footnotesize NOTES: The dependent variable is placement (the reported belief that own performance in the quiz is above the median). Models E-G are OLS regressions. Model H is a semi-structural estimation imposing the model's restriction that Treatment $1>0$. \textit{P}-values in parentheses. \sym{*} $$p<0.10$$, \sym{**} $$p<0.10$$, \sym{***} $$p<0.10$$.} \\


outside the tabular, hence the error. simply use

 \footnotesize NOTES: The dependent variable is placement (the reported belief that own performance in the quiz is above the median). Models E-G are OLS regressions. Model H is a semi-structural estimation imposing the model's restriction that Treatment $1>0$. \textit{P}-values in parentheses. \sym{*} $$p<0.10$$, \sym{**} $$p<0.10$$, \sym{***} $$p<0.10$$.

• Thank you. This works but is not perfect, since I want the notes to be aligned with the table. I have tested Phelype Oleinik's suggestion in the comment and it seems to do the trick. – Juan Pedro Aug 12 at 21:04
• also see the threeparttable evironment from the package of the same name that provides a properly aligned notes construct @JuanPedro – David Carlisle Aug 12 at 21:15

Another solution is (of course) to place multicolumn inside the tabular and add a vertical space by a new empty line plus a negative space in [] after \\:

\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{eurosym}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{caption}
\usepackage{xcolor}
\usepackage{amsmath}
\def\sym#1{\ifmmode{}^{#1}\else$${}^{#1}$$\fi}
\begin{document}
\begin{center}
%TCIMACRO{%
%\TeXButton{B}{\def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi}
%\begin{table}[h]\centering}}%
%BeginExpansion
\begin{table}[h]\centering%
%EndExpansion
\caption{Heterogeneous effect - The role of confidence} \label%
{tab:regression2}%
\begin{tabular}{lcccc}
\hline\hline
& Placement & Placement & Placement & Placement \\
& {\small {Model E}} & {\small {Model F}} & {\small {Model G}} & {\small {%
Model H }} \\ \hline
Treatment 1 & -10.61\sym{**} &  & -2.811 & 0 \\
& (0.048) &  & (0.677) & ($\cdot$) \\[1em]
Sample Score &  & 4.332\sym{***} & 3.813\sym{*} & 4.332\sym{***} \\
&  & (0.007) & (0.061) & (0.007) \\[1em]
Treat.1 $X$ Sample Score & 7.005\sym{***} & 2.064\sym{**} & 3.245 &
2.064\sym{**} \\
& (0.002) & (0.046) & (0.283) & (0.046) \\[1em]
Male & 5.031\sym{**} & 4.526\sym{*} & 4.524\sym{*} & 4.526\sym{*} \\
& (0.032) & (0.054) & (0.054) & (0.054) \\
Constant & 54.57\sym{***} & 46.17\sym{***} & 47.40\sym{***} & 46.17\sym{***} \\ %
& (0.000) & (0.000) & (0.000) & (0.000) \\ \hline\hline
N & 282 & 282 & 282 & 282 \\
$R^{2}$ & 0.0648 & 0.0761 & 0.0767 & 0.0761 \\ \hline\hline\\[-0.5em]
\multicolumn{4}{p{0.85\linewidth}}{\footnotesize NOTES: The dependent variable is placement (the reported belief that own performance in the quiz is above the median). Models E-G are OLS regressions. Model H is a semi-structural estimation imposing the model's restriction that Treatment $1>0$. \textit{P}-values in parentheses. \sym{*} $$p<0.10$$, \sym{**} $$p<0.10$$, \sym{***} $$p<0.10$$.} \\
\end{tabular}%
%TCIMACRO{\TeXButton{E}{\end{table}}}%
%BeginExpansion
\end{table}%
\end{center}
\end{document}


I would use threepartablex for table's notes and siunitx for writing numbers in table:

(red lines indicate text borders)

\documentclass[12pt]{article}

\usepackage{eurosym}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{caption}
\usepackage{xcolor}
\usepackage{amsmath}
\def\sym#1{\ifmmode{}^{#1}\else$${}^{#1}$$\fi}

\usepackage{siunitx}
\usepackage{booktabs, makecell}
\usepackage[referable]{threeparttablex}

\begin{document}
\begin{table}[ht]
\centering%
\begin{threeparttable}
\caption{Heterogeneous effect - The role of confidence}
\label{tab:regression2}%
\setlength\tabcolsep{0pt}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
l *{4}{S[input-symbols = {()},
table-space-text-post=***,
round-integer-to-decimal,
round-mode=places,
round-precision=3,
table-format=-2.3]}
}
\toprule
\midrule
Treatment 1
& -10.61\tnote{**}  &                   & -2.811            & 0                 \\
& (0.048)           &                   & (0.677)           & {$(\cdot)$}       \\
Sample Score
&                   & 4.332\tnote{***}  & 3.813\tnote{*}    & 4.332\tnote{***}  \\
&                   & (0.007)           & (0.061)           & (0.007)           \\
Treat.1 $X$ Sample Score
& 7.005\tnote{***}  & 2.064\tnote{**}   & 3.245             & 2.064\tnote{**}   \\
& (0.002)           & (0.046)           & (0.283)           & (0.046)           \\
Male
& 5.031\tnote{**}   & 4.526\tnote{*}    & 4.524\tnote{*}    & 4.526\tnote{*}    \\
& (0.032)           & (0.054)           & (0.054)           & (0.054)           \\
Constant
& 54.57\tnote{***}  & 46.17\tnote{***}  & 47.40\tnote{***}  & 46.17\tnote{***}  \\
& (0.000)           & (0.000)           & (0.000)           & (0.000)           \\
\midrule
N   & {282}             & {282}             & {282}             & {282}             \\
$R^{2}$
& 0.0648            & 0.0761            & 0.0767            & 0.0761            \\
\midrule[\heavyrulewidth]
\end{tabular*}
\begin{tablenotes}[flushleft, para]\footnotesize
\note
The dependent variable is placement (the reported belief that own performance in the quiz is above the median). Models E-G are OLS regressions. Model H is a semi-structural estimation imposing the model's restriction that Treatment $1>0$.

\textit{P}-values are in parentheses:
\item[*] $$p<0.10$$,
\item[**] $$p<0.10$$,
\item[***] $$p<0.10$$.
\end{tablenotes}
\end{threeparttable}%
\end{table}%
\end{document}