Dear Statalisters,
Is there a way to output a summary stats table (like the one below) to LaTex using Stata 17? Essentially, the table must summarize a list of variables by a group variable (i.e. Female dummy). So far, I've tried using
with no luck.
I apologize for not pasting any state code that I've tried. Nothing has come close to producing such a table.
Thanks in advance!
Is there a way to output a summary stats table (like the one below) to LaTex using Stata 17? Essentially, the table must summarize a list of variables by a group variable (i.e. Female dummy). So far, I've tried using
Code:
tabstat
I apologize for not pasting any state code that I've tried. Nothing has come close to producing such a table.
Thanks in advance!
Code:
{ \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi} \begin{tabular}{l*{1}{rrrr}} \hline \hline & Mean& Std. Dev.& Min& Max\\ \hline Female & \\[.25cm] Earnings, in thousands of US dollars & 243.89& 293.30& 25& 3000\\ \hspace{.2in} Female & 196.23& 209.93& 25& 3000\\ \hspace{.2in} Male & 263.87& 319.80& 25& 3000\\ [.25cm] Age & 46.73& 8.45& 29& 75\\ \hspace{.2in} Female & 45.89& 9.17& 29& 75\\ \hspace{.2in} Male & 47.08& 8.11& 29& 68\\[.25cm] Average number of hours worked per week & 50.20& 11.79& 10& 100\\ \hspace{.2in} Female & 47.47& 11.13& 10& 100\\ \hspace{.2in} Male & 51.35& 11.87& 10& 100\\[.25cm] At least one child & 0.78& 0.41& 0& 1\\ \hspace{.2in} Female & 0.69& 0.46& 0& 1\\ \hspace{.2in} Male & 0.82& 0.38& 0& 1\\[.25cm] At least one child below the age of 3 & 0.13& 0.33& 0& 1\\ \hspace{.2in} Female & 0.12& 0.33& 0& 1\\ \hspace{.2in} Male & 0.13& 0.34& 0& 1\\[.25cm] Married at time of survey (2022) & 0.78& 0.42& 0& 1\\ \hspace{.2in} Female & 0.68& 0.47& 0& 1\\ \hspace{.2in} Male & 0.82& 0.39& 0& 1\\ \hline \hline \end{tabular} }
Comment