Dear all,
The user-written Stata command xtsum2docx is now available on SSC, thanks to Professor Christopher Baum.
xtsum2docx can report all statistics that can be reported by xtsum and by summarize with the option detail. This is an extension of the user-written command sum2docx (instead of a wrapper, so sum2docx is not required to be installed). xtsum2docx has an additional feature to re-order the resulting table columns using the option order(). The names of statistics (e.g., mean, xtn, etc.) should be listed in the order that you would like.
To install:
Here is one example code taken from the help file (see help xtsum2docx).
While there have been many similar Stata commands that can produce a table of summary statistics (e.g., asdoc, summtab), I think producing panel data statistics has some demand as in the #9 post in the following thread:
https://www.statalist.org/forums/for...-stata-to-word
So, I hope someone may find this new command useful.
I am so grateful to the original authors of sum2docx, Chuntao Li (China Stata Club) and Yuan Xue (China Stata Club), for developing such a nice command. I also thank Li Tang (IMF) for her kind and very helpful support. I am deeply thankful to Professor Christopher F. Baum, again, to maintain the SSC archive, hosted by Boston College.
Just for convenience, below are the links to the original work and other similar Stata commands:
sum2docx
https://www.statalist.org/forums/for...-to-docx-files
asdoc
https://www.statalist.org/forums/for...stata-commands
summtab
https://www.statalist.org/forums/for...tables-table-1
Thank you!
Futoshi
The user-written Stata command xtsum2docx is now available on SSC, thanks to Professor Christopher Baum.
xtsum2docx can report all statistics that can be reported by xtsum and by summarize with the option detail. This is an extension of the user-written command sum2docx (instead of a wrapper, so sum2docx is not required to be installed). xtsum2docx has an additional feature to re-order the resulting table columns using the option order(). The names of statistics (e.g., mean, xtn, etc.) should be listed in the order that you would like.
To install:
Code:
ssc install xtsum2docx, replace
Code:
webuse abdata.dta, clear xtsum2docx n w k using temp.docx, replace obs mean(%9.2f) sd(%9.2f) p25 p50 p75 xtn xttbar(%9.2f) order(p25 p50 p75 mean sd xtbar xtn obs) title("Summary statistics")
https://www.statalist.org/forums/for...-stata-to-word
So, I hope someone may find this new command useful.
I am so grateful to the original authors of sum2docx, Chuntao Li (China Stata Club) and Yuan Xue (China Stata Club), for developing such a nice command. I also thank Li Tang (IMF) for her kind and very helpful support. I am deeply thankful to Professor Christopher F. Baum, again, to maintain the SSC archive, hosted by Boston College.
Just for convenience, below are the links to the original work and other similar Stata commands:
sum2docx
https://www.statalist.org/forums/for...-to-docx-files
asdoc
https://www.statalist.org/forums/for...stata-commands
summtab
https://www.statalist.org/forums/for...tables-table-1
Thank you!
Futoshi
Comment