tarow, "t-a-row", tabulate by each row
tarow varname1 varname2 [if exp] [in range] , [options_tabulate(tabulate options) row_options_tabulate(tabulate options for tables by each row)]
Description
tarow tabulates two numeric variables in order, row by column. Thereafter, provides, by each row level defined by the first variable, varname1, (1st level, 2nd level, ...) a 2Xn table where n equals the number of columns defined by the levels of the second variable, varname2. The two rows for each 2Xn table are level i and all other.
Options
options_tabulate(tabulate options) and row_options_tabulate(tabulate options for tables by each row) take options available to tabulate and are, in fact, passed directly to tabulate. Examples of tabulate options are: row, col, all, chi2, and exact.
Note
for this version of tarow:
1) [weight], an option of tabulate, is not supported.
2) only numeric variables are accepted; please see encode, to encode string variables to numeric.
Example
. tarow ibio_stg sex, o(row) r(chi exact col row) . tarow ibio_stg sex, if event_i~=0, o(missing) r(exact col row)
Author
Allen Buxton, Assistant Statistician Children's Oncology Group Arcadia, CA
Also see
Manual: [R] tabulate [R] encode
On-line: help for tabulate