Like this?
changes:
- introduced are three new packages:
malecell
(for two line headers), multirow
for multi row cells and siunitx
(for column type S
)
- headers of group of columns are in
\multicolumn{3}{l}{...}
- for intermediate header is used
\multicolumn{8}{l}{...}
- in columns with number the column type is changed to
S
\documentclass[11pt]{article}
\usepackage[margin=0.5in,a4paper]{geometry}
\usepackage{caption}
% \usepackage{float}
% \usepackage{titlesec}
% \usepackage{capt-of}
%dashed line
\usepackage{array, booktabs, makecell, multirow}
\renewcommand\theadfont{\bfseries\small}
\newcommand\mceight[1]{\multicolumn{8}{l}{#1}}
\usepackage{arydshln}
\setlength\dashlinedash{0.2pt}
\setlength\dashlinegap{1.5pt}
\setlength\arrayrulewidth{0.3pt}
\usepackage{siunitx}
\begin{document}
\begin{table}[ht] \centering
\small
\begin{tabular}{ l*{7}{S[table-format=2.2]} }
\toprule
\multirow[b]{2}{*}{\thead{Dependent\\ Variables}
& \multicolumn{3}{c}{\thead[b]{Share(\%)}}
& \multicolumn{3}{c}{\thead[b]{Avg hourly wage}}
& {\multirow[b]{2}{*}{\thead{Avg\\ differential}}} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}
& \textbf{Men} & \textbf{Women} & \textbf{Pooled}
& \textbf{Men} & \textbf{Women} & \textbf{Pooled} \\
\hdashline \\
\mceight{\textbf{PANEL A: 2011-2012}} \\
\midrule
\\
\mceight{Panel A.1: Sector (Urban or Rural)} \\ \hdashline
Rural & 51.5 & 54 & 52 & 28.54 & 18.83 & 26.92 & 51.5 \\ \hdashline
Urban & 48.4 & 46 & 48 & 45.19 & 41.86 & 45 & 7.8 \\ \hdashline \\
\mceight{Panel A.2: Sector (Public or Private)} \\ \hdashline
Public & 18.6 & 27.7 & 20 & 75.55 & 55.44 & 71.1 & 36.2 \\ \hdashline
Private & 81.4 & 72.3 & 80 & 27.68 & 19.67 & 26.52 & 40.7 \\ \hdashline \\
\mceight{Panel A.3: Education level} \\ \hdashline
Illilerate & 11.7 & 27.7 & 14.3 & 21.11 & 13.92 & 18.87 & 51.6 \\ \hdashline
primary & 14.5 & 14.1 & 14.4 & 23.02 & 14.36 & 21.6 & 60.3 \\
\hdashline
secondary & 46.1 & 26.08 & 42.9 & 30.13 & 20.29 & 29.17 & 48.49 \\
\hdashline
higher secondary & 12.12 & 11.1 & 11.9 & 43.13 & 39.6 & 42.6 & 8.9 \\
\hdashline
graduate & 9.9 & 11.21 & 10.1 & 67.03 & 58.84 & 65.58 & 13.91 \\
\hdashline
post graduate & 5.45 & 9.7 & 6.1 & 89.82 & 74.42 & 85.51 & 20.69 \\
\bottomrule
\end{tabular}
\end{small}
\caption{Summary statistics 2}
\end{table}
\end{document}
note:
- package
caption
contain capt-of
features, so there is no need to load it
- reconsider, if all dashed lines are necessary (i would delete most of them)
addendum:
In case that you like to have table over more pages, the use of longtable
is possible solution:
\documentclass{article}
\usepackage[margin=1in,a4paper]{geometry}
\usepackage{caption}
\usepackage{array, booktabs, longtable, makecell, multirow}
\renewcommand\theadfont{\bfseries\small}
\newcommand\mceight[1]{\multicolumn{8}{l}{#1}}
\usepackage{arydshln}
\setlength\dashlinedash{0.2pt}
\setlength\dashlinegap{1.5pt}
\setlength\arrayrulewidth{0.3pt}
\usepackage{siunitx}
\usepackage{lipsum}% for dummy text
\begin{document}
\lipsum[1-5]% text filler that table is two pages
\begin{longtable}{ l*{7}{S[table-format=2.2]} }
\caption{Summary statistics 2}
\label{tab:...} \\
\toprule
\multirow[b]{2}{*}{\thead{Dependent\\ Variables}}
& \multicolumn{3}{c}{\thead[b]{Share(\%)}}
& \multicolumn{3}{c}{\thead[b]{Avg hourly wage}}
& {\multirow[b]{2}{*}{\thead{Avg\\ differential}}} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}
& \textbf{Men} & \textbf{Women} & \textbf{Pooled}
& \textbf{Men} & \textbf{Women} & \textbf{Pooled} \\
\hdashline \\
\endfirsthead
%%%%
\caption{Summary statistics 2 (cont.)} \\
\toprule
\multirow[b]{2}{*}{\thead{Dependent\\ Variables}}
& \multicolumn{3}{c}{\thead[b]{Share(\%)}}
& \multicolumn{3}{c}{\thead[b]{Avg hourly wage}}
& {\multirow[b]{2}{*}{\thead{Avg\\ differential}}} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}
& \textbf{Men} & \textbf{Women} & \textbf{Pooled}
& \textbf{Men} & \textbf{Women} & \textbf{Pooled} \\
\midrule \\
\endhead
\midrule
\multicolumn{8}{r}{\footnotesize\textit{Continue on the next page}}
\endfoot
\endlastfoot
%%%%
\mceight{\textbf{PANEL A: 2011-2012}} \\
\midrule
\\
\mceight{Panel A.1: Sector (Urban or Rural)} \\ \hdashline
Rural & 51.5 & 54 & 52 & 28.54 & 18.83 & 26.92 & 51.5 \\
Urban & 48.4 & 46 & 48 & 45.19 & 41.86 & 45 & 7.8 \\ \\ \mceight{Panel A.2: Sector (Public or Private)} \\ \hdashline
Public & 18.6 & 27.7 & 20 & 75.55 & 55.44 & 71.1 & 36.2 \\ Private & 81.4 & 72.3 & 80 & 27.68 & 19.67 & 26.52 & 40.7 \\ \\ \mceight{Panel A.3: Education level} \\ \hdashline
Illilerate & 11.7 & 27.7 & 14.3 & 21.11 & 13.92 & 18.87 & 51.6 \\ primary & 14.5 & 14.1 & 14.4 & 23.02 & 14.36 & 21.6 & 60.3 \\
secondary & 46.1 & 26.08 & 42.9 & 30.13 & 20.29 & 29.17 & 48.49 \\
higher secondary & 12.12 & 11.1 & 11.9 & 43.13 & 39.6 & 42.6 & 8.9 \\
graduate & 9.9 & 11.21 & 10.1 & 67.03 & 58.84 & 65.58 & 13.91 \\
post graduate & 5.45 & 9.7 & 6.1 & 89.82 & 74.42 & 85.51 & 20.69 \\
\bottomrule
\end{longtable}
\end{document}
edit:
For longtable
solution now i stole some idea (regarding first and last columns header) from Mico answer ... and add \midrule
for the \endfoot
.
\begin{document}
, isen't minimal and does not compile. Please use the edit button. A related question is here: How to multicolumn in booktabs?article
document class doesn't recognize -- and hence ignores -- the option10.5pt
.