Thanks to Kit Baum as always, the program summtab is now available on SSC.
summtab facilitates the creation of publication-quality summary tables in Word or Excel format. The types of summary tables produced are often "Table 1" in publications.
From the abstract on SSC:
Manually typing summary tables from statistical output is tedious, time-consuming, and error-prone. Therefore, it is never recommended to enter tables “by hand.” The summtab command facilitates and automates the creation of a publication-quality summary table (usually “Table 1” in research articles) output to Word using the Stata command putdocx, thus saving the user time and eliminating copy-and-paste errors. The summtab command summarizes both continuous and categorical variables, overall and/or across levels of (i.e., stratified by) a categorical variable. Various options allow the user to select which summary statistics to report, how to format numbers, and whether to output as both a Word and Excel file, among other options.
See the help file for examples and features, or try it out now using:
summtab requires Stata 15, as it uses putdocx.
Please feel free to email me (see help file) if you find any bugs or notice any features left out that you'd like added, or simply to let me know if you're finding the package useful.
Special thanks to members of the Duke Global Health Institute Research Design & Analysis Core for testing the code and providing recommendations for improving the program.
Full disclosure, I used the code provided by William Parker here as the beginning structure for my code, but made many additions and changes including new formatting and more control over formatting, the option to output to Excel, more statistics (medians, min, max, etc.), the ability to suppress p-values, etc.
summtab facilitates the creation of publication-quality summary tables in Word or Excel format. The types of summary tables produced are often "Table 1" in publications.
From the abstract on SSC:
Manually typing summary tables from statistical output is tedious, time-consuming, and error-prone. Therefore, it is never recommended to enter tables “by hand.” The summtab command facilitates and automates the creation of a publication-quality summary table (usually “Table 1” in research articles) output to Word using the Stata command putdocx, thus saving the user time and eliminating copy-and-paste errors. The summtab command summarizes both continuous and categorical variables, overall and/or across levels of (i.e., stratified by) a categorical variable. Various options allow the user to select which summary statistics to report, how to format numbers, and whether to output as both a Word and Excel file, among other options.
See the help file for examples and features, or try it out now using:
Code:
ssc install summtab sysuse auto, clear summtab, by(foreign) cont_vars(price mpg weight length) cat_vars(rep78) mean median pval landscape replace wordname(summary_table) title(My Table 1)
Please feel free to email me (see help file) if you find any bugs or notice any features left out that you'd like added, or simply to let me know if you're finding the package useful.
Special thanks to members of the Duke Global Health Institute Research Design & Analysis Core for testing the code and providing recommendations for improving the program.
Full disclosure, I used the code provided by William Parker here as the beginning structure for my code, but made many additions and changes including new formatting and more control over formatting, the option to output to Excel, more statistics (medians, min, max, etc.), the ability to suppress p-values, etc.
Comment