Export tabcount output from Stata
tabcount is a community-contributed package written by Nicholas J. Cox. It tabulates frequencies for up to 7 variables. Users of asdocx have requested the addition of support for
tabcount. Beginning with version 2.2.0, asdocx will export tabcount output from Stata to Word, Excel, LaTeX, or HTML.
A slightly modified version of the program is available on the asdocx website, which is automatically downloaded when a user first uses it with asdocx. The modification is done to extract only the output matrix from the program and send it to asdocx, no other changes are made1. To use it with asdocx, simply add “asdocx” as a prefix. Here are some examples of how to use it with asdocx.
* Load example dataset webuse nlswork, clear * asdocx with tabcount asdocx tabcount union ind_code, v1(1 0) v2(1/6) replace
|industry of employment|
|1 if union||1||2||3||4||5||6|
Please note that both asdocx and tabcount have an optional option
replace. To ensure clear and accurate usage, users may use the
poption(replace) when they intend to use option
replace with tabcount.
Example from tabcount help file
* Load example dataset sysuse auto, clear tabcount foreign rep78, v1(0 1) v2(1/5) replace egen pcfreq = pc(_freq), by(foreign) bysort foreign (rep78) : gen cupc = sum(pcfreq) * Export tabdisp output with asdocx asdocx tabdisp foreign rep78, c(pcfreq cupc)
|Car type||Repair Record 1978|
- tabmany – Table of multiple coded answers
- tab3way – Three way table of frequencies and percentages
- mrtab – One- and two-way tables of multiple responses
- fre – One-way frequency tables
- missings – Various utilities for managing missing values
- tabulate, tab1, tab2
- pctab – Percentage over a grouping variable
Yearly license of asdocx is available at $9.99. Its life-time license is available at $49.99. With the asdocx membership, you get :
- Life-time license to use
- All future updates
- All premium templates / plugins.
Cox, N. J. (2003). Speaking Stata: problems with tables, part II. The Stata Journal, 3(4), 420-439.
1. We thank Dr Cox for permission to re-use his code and take full responsibility for the effects of any changes made in incorporating that code within asdocx.