\documentclass[12pt]{article} \newcommand{\bs}{$\backslash$} \thispagestyle{empty} \begin{document} \section{Tabstat in \LaTeX using {\tt latabstat} Command} \noindent Example 2: Requesting more statistics As you can see from the example below, the syntax for requesting more statistics is the same as {\tt tabstat}. \begin{small} \begin{verbatim} . tabstat write, by(female) s(mean sd) f(%5.2f) Summary for variables: write by categories of: female female | mean sd -------+-------------------- male | 50.12 10.31 female | 54.99 8.13 -------+-------------------- Total | 52.77 9.48 ---------------------------- . latabstat write, by(female) s(mean sd) f(%5.2f) \begin{table}[htbp]\centering \caption{\label{} \textbf{} }\begin{tabular} {@{} l r r @{}} \\ \hline \textbf{female } & \textbf{ mean} & \textbf{ sd} \\ \hline male & 50.12 & 10.31 \\ female & 54.99 & 8.13 \\ Total & 52.77 & 9.48 \\ \hline \multicolumn{3}{@{}l}{\footnotesize{\emph{Source:} http://www.ats.ucla.edu/stat/stata/notes/hsb2.dta}} \end{tabular} \end{table} \end{verbatim} \end{small} \begin{table}[htbp]\centering \caption{\label{} \textbf{} }\begin{tabular} {@{} l r r @{}} \\ \hline \textbf{female } & \textbf{ mean} & \textbf{ sd} \\ \hline male & 50.12 & 10.31 \\ female & 54.99 & 8.13 \\ Total & 52.77 & 9.48 \\ \hline \multicolumn{3}{@{}l}{\footnotesize{\emph{Source:} http://www.ats.ucla.edu/stat/stata/notes/hsb2.dta}} \end{tabular} \end{table} \end{document}