Here are my example and the code.
\begin{table}[H]
\begin{tabular}{lrrrr}
\toprule
\multirow{2}[3]{*}{Method} & \multicolumn{2}{c}{group} & \multicolumn{2}{c}{variable} \\
\cmidrule(l){2-3} \cmidrule(l){4-5}
& rate & size & rate & size \\
\midrule
s = 1/2 & 0.7668 (0.0058) & 8.78 (0.086) & 0.7184 (0.0067) & 11.07 (0.098) \\
s = 1/4 & 0.7768 (0.0066) & 12.81 (0.099) & 0.6732 (0.0063) & 15.29 (0.103) \\
\bottomrule
\end{tabular}
\end{table}
My question is rather simple. I wish to keep the column names (rate, size) in the second row centered, while the numbers in the table aligned to right. How could I achieve that? Moreover, how to use cmidrule
, especially what does its first option do? I tried to change to \cmidrule{lr}
and cmidrule{r}
, but seems no difference to me.
Thanks for the help.