table multiway — Multiway tables 5
Options
listwise handles missing values through listwise deletion, meaning that the entire observation is
omitted from the sample if any variable specified in a statistic() option is missing for that
observation. By default, table will omit an observation only if all variables specified in all
statistic() options are missing for that observation.
missing specifies that numeric missing values of any rowvars, colvars, or tabvars be treated as valid
categories. By default, observations with a numeric missing value in rowvars, colvars, or tabvars
are omitted.
showcounts specifies that table report the sample size for each variable specified in option
statistic().
zerocounts specifies that table report a 0 in empty cells for the frequency statistic.
name(cname) specifies that a collection named cname be associated with the collected statistics and
results. The default is name(Table).
append specifies that table append its collection information into the collection named in name().
replace permits table to overwrite an existing collection. This option is implied for name(Table)
when append is not specified.
label(filename) specifies the filename containing the collection labels to use for your table. Labels
in filename will be loaded for the table, and any labels not specified in filename will be taken
from the labels defined in c(collect label). The default is to use only the collection labels
set in c(collect label); see [TABLES] set collect label.
style(filename
, override
) specifies the filename containing the collection styles to use for
your table. The default collection styles will be discarded, and only the collection styles in filename
will be applied.
If you prefer the default collection styles but also want to apply any styles in filename, specify
override. If there are conflicts between the default collection styles and those in filename, the
ones in filename will take precedence.
The default is to use only the collection styles set in c(table style); see [TABLES] set table style.
The following option is available with table but is not shown in the dialog box:
markvar(newvar) generates an indicator variable that identifies the observations used in the tabulation.
Remarks and examples stata.com
Remarks are presented under the following headings:
Introduction
Tables with columns defined by multiple variables
Appending tables
Multiple tables with specified totals
Introduction
The table command allows you to create complex tables beyond one- and two-way tabulations.
In multiway tabulations, you can display frequencies across levels of two or more variables. You can
have levels of one variable nested within levels of another variable in columns, in rows, or in both
dimensions. And with a single command, you can create separate tables for levels of one or more
variables or for different results.