[Tex/LaTex] Misplaced \omit.\multispan ->\omit@\multispan. I expect to see \omit only after tab marks or the \cr of an alignment

beamertables

I made this table that after compiling works properly but I got the message above: can anyone please help me in order to understand what is wrong?

\begin{tabular}{cp{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}}
    \bigskip
    \multicolumn{1}{c}{\large\textbf{\underline{Model}}}&\multicolumn{4}{c}{\large\textbf{\underline{Parameters}}}\\
    \medskip
    & $\mu$ & $\alpha$ & $\beta$ & $\lambda_p$ & $\lambda_b$ \\ \hline
    \medskip
    \textbf{Poisson} & - & - & - & $2,66\times10^{-2}$ & - \\ \hline 
    \medskip
   \textbf{ Hawkes} & close to 0 & 3.53 & 3.97 & - & - \\ \hline
    \medskip
    \textbf{Branching} & - & - & - & - & $0,13\times10^{-2}$ \\ \hline 
\end{tabular}

Best Answer

Two problems:

  • your first row only has 1+4=5 columns, while your table has 6 columns

  • instead of trying to add skips, I suggest to use \addlinespace from the booktabs package

Not strictly speaking a problem, but with 0,13 the spacing around the , will most likely be wrong. I suggest to have a look at the siunitx package

\documentclass{beamer}


\begin{document}

\begin{frame}
\begin{tabular}{cp{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}}
%    \bigskip
    \multicolumn{2}{c}{\large\textbf{\underline{Model}}}&\multicolumn{4}{c}{\large\textbf{\underline{Parameters}}}\\
%    \medskip
    & $\mu$ & $\alpha$ & $\beta$ & $\lambda_p$ & $\lambda_b$ \\ \hline
    \medskip
    \textbf{Poisson} & - & - & - & $2,66\times10^{-2}$ & - \\ \hline 
    \medskip
   \textbf{ Hawkes} & close to 0 & 3.53 & 3.97 & - & - \\ \hline
    \medskip
    \textbf{Branching} & - & - & - & - & $0,13\times10^{-2}$ \\ \hline 
\end{tabular}
\end{frame}

\end{document}