In an article I met this table.
How can one design such a table?
Here's a solution that uses the dcolumn package to align the numbers on the decimal markers.
\documentclass{article}
\usepackage{dcolumn,booktabs}
\newcolumntype{d}[1]{D..{#1}}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro
\begin{document}
\begin{table}
\centering
\begin{tabular}{ l *{4}{d{4.5}} }
\toprule
& \multicolumn{2}{c}{A} & \multicolumn{2}{c}{B}\\
\cmidrule(lr){2-3} \cmidrule(l){4-5}
& \mc{Weight (lbs.)} & \mc{Weight (lbs.)} & \mc{Price} & \mc{Price} \\
\midrule
Mileage & -108.4^{***} & -91.22^{***} & & \\
& (-11.60) & (-10.34) & & \\
\addlinespace
Car type & & & & \\
& & & & \\
\addlinespace
Weight (lbs.) & & & 1.747^{***} & 3.465^{***}\\
& & & (2.72) & (5.49) \\
\addlinespace
Constant & 5328.8^{***} & & & \\
& (25.85) & & & \\
\midrule
Observations & \mc{74} & \mc{74} & \mc{74} & \mc{74} \\
\bottomrule
\multicolumn{5}{l}{\footnotesize $t$ statistics in parentheses}\\
\multicolumn{5}{l}{\footnotesize ${}^{*}\ p<0.05$, \dots}\\
\end{tabular}
\end{table}
\end{document}
Here is an option using booktabs only. Alignment around the decimal . is achieved using extra right-and-left aligned columns:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ l *{4}{r@{}l} }
\toprule
& \multicolumn{4}{c}{A} & \multicolumn{4}{c}{B} \\
\cmidrule(lr){2-5} \cmidrule(lr){6-9}
& \multicolumn{2}{c}{Weight (lbs.)} & \multicolumn{2}{c}{Weight (lbs.)} &
\multicolumn{2}{c}{Price} & \multicolumn{2}{c}{Price} \\
\midrule
Mileage (mpg) & $-108$&$.4^{***}$ & $-91$&$.22^{***}$ & $-49$&$.51$ & $21$&$.85$ \\
& $(-11$&$.60)$ & $(-10$&$.34)$ & $(-0$&$.57)$ & $(0$&$.29)$ \\
\addlinespace
Car type & & & $-550$&$.1^{***}$ & & & $3673$&$.1^{***}$ \\
& & & $(-4$&$.96)$ & & & $(5$&$.37)$ \\
\addlinespace
Weight (lbs.) & & & & & $1$&$.747^{**}$ & $3$&$.465^{***}$ \\
& & & & & $(2$&$.72)$ & $(5$&$.49)$ \\
\addlinespace
Constant & $5328$&$.8^{***}$ & $5125$&$.7^{***}$ & $1946$&$.1$ & $-5853$&$.7$ \\
& $(25$&$.85)$ & $(27$&$.93)$ & $(0$&$.54)$ & $(-1$&$.73)$ \\
\midrule
Observations & $74$& & $74$ & & $74$& & $74$& \\
\bottomrule
\multicolumn{9}{l}{\small $t$ statistics in parentheses} \\
\multicolumn{9}{l}{\small $^*\ p < 0.05$, $^{**}\ p < 0.01$, $^{***}\ p < 0.0001$}
\end{tabular}
\end{document}
Incorporating siunitx is left to the reader as an exercise.
booktabspackage for nice horizontal lines and thesiunitxpackage for column aligned on decimal point. Other than that the table looks pretty simple. – Sergei Golovan Feb 24 '17 at 06:19booktabsfor the horizontal lines;siunitxfor lining the digits on the decimal point;threeparttable(x)for the 'notes' at the bottom;\multicolumnto make things span more than one column. – jon Feb 24 '17 at 06:20xtable,stargazerortexregcannot make that table automatically for you. See the Reproducible Research if you are interested in LaTeX ouputs from R. – Fran Feb 24 '17 at 06:56