misalignment of column values in a tabular* / dcolumn table

I am using the following code to create a table for a paper I am writing in Overleaf.

\usepackage{array}
\usepackage{dcolumn}
\usepackage{booktabs}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}
\begin{table}
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}d{5.5}d{5.8}d{5.5}}
\toprule
\noalign{\vskip 0.2in}
&  \multicolumn{2}{c}{Fisher-Zou} &
\multicolumn{1}{c}{Wilcox-Muska} \\
\multicolumn{1}{c}{GROUP} & \multicolumn{1}{c}{p-value} & \multicolumn{1}{c}{CI's} & \multicolumn{1}{c}{CI's} \\
\noalign{\vskip 0.2in}
\midrule
\noalign{\vskip 0.2in}
\multicolumn{1}{c}{females} \\
\noalign{\vskip 0.1in}
(A vs. B) & .0043 & .0083-.5788 & -.0671-.4987 \\
(A vs. C) & .0005 & .1630-.5764 & .0767-.4990 \\
(A vs. D) & .0096 & .0789-.6195 & .0062-.5262 \\
(A vs. E) & .6926 & -.2448-.1991 & -.1997-.1475 \\
\bottomrule
\end{tabular*}
\end{table}


The problem is that the values do not centre under the subheadings p-value, CI's and CI's, which in turn do not position correctly under the headings Fisher-Zou (should encompass data columns 2 and 3)and Wilcox-Muska (the final data column).

• A quick hint: If you highlight the lines of LaTeX code and click on the {} "button" in the row above the editing window, they'll be shifted four spaces to the right and will be pretty-printed by the site software.
– Mico
Apr 29 '16 at 13:52
• @Mico sorry, I was just in the process of editing to display the code properly when you posted your edit! Apr 29 '16 at 13:52
• What means number .0083-.5788? Is the second part a tolerance of the first part of number? Apr 29 '16 at 14:04
• @Zarko it represents a confidence interval so 'between' .0083 and .5788 Apr 29 '16 at 14:06
• Isn't than better to type them in stabdard columns? Like ...& .0083 & -.5788 & ... ? Apr 29 '16 at 14:08

an alternative ... withtabularx and siunitx instead of D columns:

\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
\newcolumntype{d}[1]{D{.}{.}{#1}}

\usepackage{siunitx}

\begin{document}
\begin{table}
\begin{tabularx}{\textwidth}{X S[table-format=1.4]
}
\toprule
&  \multicolumn{3}{c}{Fisher-Zou}
&   \multicolumn{2}{c}{Wilcox-Muska}                \\
\cmidrule(r){2-4}\cmidrule(l){5-6}
\multicolumn{1}{c}{GROUP}
&   {p-value}
&   \multicolumn{2}{c}{CI's}
&   \multicolumn{2}{c}{CI's}                \\
\midrule
females   &   \multicolumn{5}{c}{}                      \\
(A vs. B) & .0043 &  .0083 & .5788  & -.0671 & .4987    \\
(A vs. C) & .0005 &  .1630 & .5764  &  .0767 & .4990    \\
(A vs. D) & .0096 &  .0789 & .6195  &  .0062 & .5262    \\
(A vs. E) & .6926 & -.2448 & .1991  & -.1997 & .1475    \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}

• I'm not sure whether "Fisher-Zou" should span columns 2, 3,and 4 or just columns 3 and 4. Let's see if the OP weighs in with more Information.
– Mico
Apr 29 '16 at 14:54
• yep, with the added advantage that the p-value sits under the Fisher-Zou heading (the R package for Wilcox-Muska only computes intervals). Apr 29 '16 at 14:56
• yes, sorry Mico I should have picked that up immediately, the Fisher-Zou is p-values and the first CI's. It will be good practice to use your code and see if I can get it looking like Zarko's solution. Looks like I can only mark one answer as acceptable or best? But I think both would work. Mico's Version could be described adequately in the caption. Apr 29 '16 at 14:58

When using the D column type, be careful to provide only one number containing a decimal marker per cell. Also, take care to distinguish between a typographic - ("minus") and -- ("en-dash") symbol.

I would suggest you organize the table as follows:

\documentclass{article}
\usepackage{dcolumn,booktabs}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}

\begin{table}
\centering
\begin{tabular}{@{} l d{1.4} *{2}{d{2.4}@{\,--\,}d{1.4}} @{}}
\toprule
Group & \multicolumn{1}{c}{$p$-value}
& \multicolumn{2}{c}{Fisher-Zou}
& \multicolumn{2}{c@{}}{Wilcox-Muska} \\
&& \multicolumn{2}{c}{CIs} & \multicolumn{2}{c@{}}{CIs} \\
\midrule