asdocx with missings
missings is a community-contributed package written by Nicholas J. Cox. missings is a set of utility commands for managing and reporting variables that may have missing values. By default, “missing” means numeric missing (that is, the system missing value . or one of the extended missing values .a to .z) for numeric variables and empty or “” for string variables.
Users of asdocx have requested the addition of support for missings. Beginning with version 2.2.0, asdocx will now support it, allowing users to export its output table to Word, Excel, LaTeX, or HTML.
How asdocx works with missings
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. asdocx captures output from three sub-commands:
list. However, it does not generate any output from other sub-commands of missings. 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 weuse nlswork, clear * asdocx with missings asdocx missings report, replace
* Table of missing values asdocx missings table, replace
|# of missing values||Freq.||Percent||Cumulative Freq.|
* missings list lists observations with missing values in varlist. asdocx missings list, minimum(5) /// replace title(Table: List missing with at least 5 missing observations)
|numeric||Indicates to include numeric variables only. If any string variables are named explicitly, such variables will be ignored.|
|string||Indicates to include string variables only. If any numeric variables are named explicitly, such variables will be ignored.|
|sysmiss||Indicates to include system missing . only. This option has no effect with string variables, for which missing is deemed to be the empty string “”, regardless.|
|generate(newvar)||Specifies the name of a new variable. generate() is required.|
|observations||S(missings report) indicates counting of missing values by observations, not the default of counting by variables.|
|minimum(#)||(missings report, missings list, and missings table) specifies the minimum number of missings to be shown explicitly. With missings table, the default is minimum(0); otherwise, it is minimum(1).|
|format(format)||(missings report) specifies a display format for percents. The default is format(%5.2f). This option has no effect unless percent is also specified.|
|percent (missings report)||reports percents missing as well as counts. Percents are calculated relative to the number of observations or variables specified.|
|identify(varlist)||or identify(varname) (missings report, missings list, and missings table) insists on showing varlist or varname in the display of results. This can be especially useful to show (for example) identifier variables, which typically will not be missing, or key categorical variables such as education or gender. With missings report, observations and missings list, varlist is included in the list results. With missings table, varname is used to produce a two-way table in contrast to a one-way table; two or more variables may not be specified.|
|sort(specification)||(missings report) specifies that output be sorted. specification must be either missings or alpha and may also include descending. missings means sorting is done by the number of missing values. alpha means sorting is done by the variable name. Optionally including descending means to sort either the number of missing values or the variable names and display them in descending order; the default is ascending order. For example, sort(missings descending) means the variables with the most missing values will be sorted and shown first.|
|force||Signals that the dataset in memory is being changed and is a required option when data are being dropped and the dataset in memory has not been saved as such.|
- tabmany – Table of multiple coded answers
- mrtab – One- and two-way tables of multiple responses
- tabcount – tabulates frequencies for up to 7 variables
- tab3way – Three way table of frequencies and percentages
- missings – Various utilities for managing missing values
- tabulate, tab1, tab2
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. (2015). Speaking Stata: A set of utilities for managing missing values. The Stata Journal, 15(4), 1174-1185.
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.