I'm using estout (esttab actually) to produce a table in Latex from Stata. I'm using the dcolumn package to align the decimal places in my table.
I want to override the alignment for a single row; to be specific the number of observations row. Is there a way of doing this? Or, equivalents, if there a way to prefix each element in a row with "\multicolumn{1}{c}{" and suffix with "}", which would override the dcolumn alignment?
Example:
\begin{table}[htbp]\centering
\caption{My Table}
\begin{tabular}{l*{3}{D{.}{.}{-1}}}
\toprule
&\multicolumn{1}{c}{Mean/s.d.}&\multicolumn{1}{c}{Mean/s.d.}&\multicolumn{1}{c}{Mean/s.d.}\\
\midrule
Var A & 8.68& 8.51& 8.92\\
& 2.42& 2.51& 2.26\\
Var B & 2.14& 1.98& 2.37\\
& 1.33& 1.29& 1.35\\
\midrule
Observations & 38040& 22054& 15986\\
\bottomrule
\end{tabular}
\end{table}
Thanks!