1

Hi I'm new to Latex and have a table that keeps erroring out with a Misplaced \omit error. Can someone help me identify what the issue is? The code is below. Thank you

\begin{table}
 \TABLE
{Return Lag and Return Rate Descriptive Statistics for Electronics Dataset \label{tab:testa}}
{\begin{tabular}{lccccccc} \hline
\up \down  & \multicolumn{3}{c}{Return Rate} & \multicolumn{3}{c}{Return Lag} & Total Observations \\ \cline{2-8}
\up \down \multicolumn{1}{c}{Category} & Average & Std. Dev. & Coeff. of Var. & Average & Std. Dev. & Coeff. of Var. \\ \hline
\up Audio & 12\%  & 0.32  & 2.76  & 12.9  & 20.0  & 1.6 &  11,367 \\
    Auto Parts & 14\%  & 0.35  & 2.44  & 21.9  & 54.1  & 2.5  &  7,211 \\
    Cable & 11\%  & 0.31  & 2.91  & 10.9  & 19.8  & 1.8  &  9,398 \\
    Computer & 11\%  & 0.31  & 2.90  & 11.1  & 23.0  & 2.1 & 21,811  \\
    Imaging & 11\%  & 0.31  & 2.92  & 11.8  & 19.9  & 1.7 & 7,823   \\
    Mobile Phone & 16\%  & 0.37  & 2.27  & 28.9  & 74.4  & 2.6  &  3,126 \\
    Phone  & 14\%  & 0.35  & 2.47  & 16.1  & 30.6  & 1.9 & 5,777 \\
    TV    & 8\%   & 0.28  & 3.28  & 11.3  & 21.5  & 1.9 &  9,413  \\
    TV Box & 14\%  & 0.34  & 2.52  & 14.7  & 28.5  & 1.9 & 9,799 \\
\down   \textbf{Sample Average} & \textbf{12\%} & \textbf{0.33} & \textbf{2.72} & \textbf{15.5} & \textbf{32.4} & \textbf{2.0} & \textbf{1,201.05} \\ \hline
    \end{tabular}}%
{}
\end{table}%
  • Welcome to TeX.SX! Please make your code complete with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. – CarLaTeX Jul 12 '17 at 3:21
  • also unrelated to the error you should probably not be using c columns for numeric columns, use r or a decimal aligned column from dcolumn or siunitx package, so the digits line up correctly. What are \TABLE, \up, \down ? – David Carlisle Jul 12 '17 at 7:55
3

You cannot have text in the same cell as a \multicolumn. Move this text inside, i.e. transform

\up \down \multicolumn{1}{c}{Category}

into

\multicolumn{1}{c}{\up \down Category}
\documentclass{article}

\newcommand\up{?}
\newcommand\down{??}

\begin{document}

\begin{tabular}{lccccccc} \hline
  \up \down                              & \multicolumn{3}{c}{Return Rate} & \multicolumn{3}{c}{Return Lag} & Total Observations                                                                \\ \cline{2-8}
  \multicolumn{1}{c}{\up \down Category} & Average                         & Std. Dev.                      & Coeff. of Var. & Average       & Std. Dev.     & Coeff. of Var.                   \\ \hline
  \up Audio                              & 12\%                            & 0.32                           & 2.76           & 12.9          & 20.0          & 1.6          & 11,367            \\
  Auto Parts                             & 14\%                            & 0.35                           & 2.44           & 21.9          & 54.1          & 2.5          & 7,211             \\
  Cable                                  & 11\%                            & 0.31                           & 2.91           & 10.9          & 19.8          & 1.8          & 9,398             \\
  Computer                               & 11\%                            & 0.31                           & 2.90           & 11.1          & 23.0          & 2.1          & 21,811            \\
  Imaging                                & 11\%                            & 0.31                           & 2.92           & 11.8          & 19.9          & 1.7          & 7,823             \\
  Mobile Phone                           & 16\%                            & 0.37                           & 2.27           & 28.9          & 74.4          & 2.6          & 3,126             \\
  Phone                                  & 14\%                            & 0.35                           & 2.47           & 16.1          & 30.6          & 1.9          & 5,777             \\
  TV                                     & 8\%                             & 0.28                           & 3.28           & 11.3          & 21.5          & 1.9          & 9,413             \\
  TV Box                                 & 14\%                            & 0.34                           & 2.52           & 14.7          & 28.5          & 1.9          & 9,799             \\
  \down   \textbf{Sample Average}        & \textbf{12\%}                   & \textbf{0.33}                  & \textbf{2.72}  & \textbf{15.5} & \textbf{32.4} & \textbf{2.0} & \textbf{1,201.05} \\ \hline
\end{tabular}

\end{document}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.