Home Forums ASDOC : Easy Publication Quality Tables in Stata asdoc: using two variables with bysort for summary statistics Reply To: asdoc: using two variables with bysort for summary statistics

Attaullah Shah
Keymaster
Post count: 69

Currently, asdoc allows bysort prefix with only one variable. If you need to use two variables with bysort, then there is a workaround. Convert both the variables to a single with using the group function of egen, and then use the new variable with asdoc. see this example

egen Ctry_ID= group(Country IDType)

bysort Ctry_ID: asdoc sum Var1

Please cite asdoc in your research.
In-text citation
Tables were created using asdoc, a Stata program written by Shah (2018).

Bibliography
Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.