asdocx with tab3way
Introduction to tab3way
tab3way is a community-contributed package written by Philip Ryan.
tab3way cross-tabulates 3 variables and displays any combination of cell frequencies, cell percents, row percents and column, percents. “Missing” categories may be specified. tab3way optionally provides row, column and supercolumn, totals by temporarily augmenting observations in the existing data set and making a new category (labelled “TOTAL”) for each variable to accommodate these totals.
Users of asdocx have requested the addition of support for
tab3way. Beginning with version 2.2.5, asdocx will now support it, allowing users to export its output table to Word, Excel, LaTeX, or HTML.
How tab3way works with asdocx
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.
Example of using tab3way with asdocx
* Load example dataset sysuse auto, clear * Create a variable with 4 categories of the price egen price_cat = cut(price), group(4) * asdocx with tab3way asdocx tab3way price_cat rep78 foreign, allp allt usemiss replace save(Tabulations.xlsx)
|Car origin and Repair record 1978|
tab3way command comes in with a variety of options to customize the output of your three-way tabulations. Here are the available options:
|freq|nofreq||displays|does not display cell frequencies. freq is the default.|
|cellpct||displays cell percentages. The denominator of the cell percentage is the total N over the entire table.|
|rowpct||displays row percentages. The denominator for the row percentage is the total N over all categories of the supercolvar within a specific rowvar/colvar combination.|
|colpct||displays column percentages. The denominator for the column percentage is the total N over all categories of the rowvar within a specific supercolvar/colvar combination.|
|allpct||displays cell frequencies and cell, row and column percentages. Specifying none of cellpct, rowpct, colpct or allpct provides just frequencies (default).|
|rowtot||displays row totals.|
|coltot||displays column totals.|
|scoltot||displays supercolumn totals.|
|alltot||displays row, column and supercolumn totals.|
|usemiss||shows missing values as a separate category, similar to tabulate.., missing. (missing is an option for tab3way insofar as it is passed to tabdisp, where it has a different role.)|
|format(%fmt)||specifies the display format for presenting percentages in the table’s cells (the frequencies, if specified, are always displayed as integers). The default is %8.2f, which gives 2 decimal places.|
- tabmany – Table of multiple coded answers
- mrtab – One- and two-way tables of multiple responses
- fre – One-way frequency tables
- missings – Various utilities for managing missing values
- tabulate, tab1, tab2
- tabcount – Tabulate upto 7 variables
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.
Ryan, P. (2002). TAB3WAY: Stata module to handle three-way tables with percentages.