1

I've started using siunitx for decimal alignment and can't figure out a solution to the following problem:

I am working on a regression table with confidence intervals positioned next to the estimates. I want the column to be aligned by the decimal point of the estimates. My preferred design is given by the code below, except for the problem of fitting the numbers inside the curly braces into the table.

The output I get is in the image. enter image description here

\begin{tabular}{lS[table-format =3.2]}
\toprule
{} &                        (1) \\
\midrule

Sex   &  2.56 {(-228.68\,;\,15.52)}\\
Age &  33.45 {(-228.68{\,;\,}15.52)}\\

\bottomrule
\end{tabular}
3
  • 1
    Wouldn't it be as simple to have the confidence intervals in a third column?
    – Bernard
    May 13 '20 at 15:38
  • yes, but I would prefer the column name to be centered over the combination of the estimate and the precision. and, with separate columns, the table looks ...less compact May 13 '20 at 16:08
  • 1
    It's possible to remove the space between columns, and by merging two cells in the header row (\multicolumn{2}{c}{(1)}) you'd get the centering. May 14 '20 at 15:56
1

What about these, follows the recommendation given by comments on the OP

\begin{tabular}{l
    S[table-format =3.2]
    l
    }
\toprule
{} & \multicolumn{2}{c}{(1)} \\
\midrule

Sex   &  2.56 &(-228.68 ; 15.52)\\
Age &  33.45  &(-228.68 ; 15.52)\\

\bottomrule
\end{tabular}

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.