I have the following code to put an extra space (a carriage return) after every second row. How can I edit the code to put the extra space after every third row instead?
\documentclass[12pt]{article}
\usepackage{booktabs}
\usepackage{dcolumn}
\begin{document}
\begin{table}
\begin{tabular*}{1\textwidth}{@{
\global\let\restorecr=\\
\extracolsep{\fill} } c *{4}{c}}
\toprule
\global\let\oldcr=\\
\global\def\crsng{\global\let\\ =\crdbl\oldcr}
\global\def\crdbl{\global\let\\ =\crsng\oldcr[40pt]}
\global\let\\=\crdbl
& \multicolumn{4}{c}{\textbf{Panel A}}\\
\midrule
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
\bottomrule
\end{tabular*}
\global\let\\ =\restorecr
\end{table}
\end{document}
EDIT: If I add more panels of data the solution proposed below no longer works.
&\multicolumn{4}{c}{\textbf{All Data}}\tabularnewline
& \multicolumn{4}{c}{\textbf{Panel A}}\tabularnewline
\midrule
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
a & 0.55 & 0.66 & 0.64 & 0.64 \\
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
& \multicolumn{4}{c}{\textbf{Panel B}}\tabularnewline
\midrule
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
a & 0.55 & 0.66 & 0.64 & 0.64 \\
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
& \multicolumn{4}{c}{\textbf{Panel C}}\tabularnewline
\midrule
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
a & 0.55 & 0.66 & 0.64 & 0.64 \\
a & 0.55 & 0.66 & 0.64 & 0.64 \\
& 0.55 & 0.66 & 0.64 & 0.64 \\
\global\let\\=\restorecr
is a mistake, because\\
has different meanings inside a tabular than outside.