{smcl}
{* 29Oct2003}{...}
{hline}
help for {hi:tarowi}{right:(see also:  {hi:[R] tabulate})}
{hline}

{title:tarowi}, "t-a-rowi", {title:tabulate by each row - immediate}

{p 8 17}{cmd:tarowi} {cmd:(}{it:matrix definition syntax}{cmd:)} OR {it:existing matrix name} {it:,}
         [{cmdab:o:ptions_tabulate(}{it:tabulate options}{cmd:)}
          {cmdab:r:ow_options_tabulate(}{it:tabulate options for tables by each row}{cmd:)}]

{title:Description}

{p 0 4}{cmd:tarowi} tabulates row by column a table defined by the {it:matrix definition syntax}. 
Thereafter, provides, by each row level (row==1, row==2, ...) a 2Xn 
table where n equals the number of columns defined by the columns of the matrix definition.  
The two rows for each 2Xn table are {it:row==i} and {it:all other}. 
{p_end}

{title:Options}

{p 0 4} {cmdab:o:ptions_tabulate(}{it:tabulate options}{cmd:)} and 
{cmdab:r:ow_options_tabulate(}{it:tabulate options for tables by each row}{cmd:)} take 
options available to {help tabulate} and are, in fact, passed directly to {help tabulate}. 
Examples of tabulate options are:{it: row, col, all, chi2,} and {it:exact}.

{title:Note}

{p 0 4} the parentheses are required in: {cmd:(}{it:matrix definition syntax}{cmd:)} and the matrix definition
must be valid or a vauge "syntax error" will result.

{p 0 4} if {it:existing matrix name} is provided: 1) no parentheses are required and, if included, result in a syntax error. 
2) the matrix labels are not used (as yet anyway).

{p 0 4} currently {cmd:tarowi} is setup to return the p-value for the exact test, if exact is specified as an option in 
{cmdab:r:ow_options_tabulate(}{it:tabulate options for tables by each row}{cmd:)}. The p-values, one for each 2Xn table, 
are called: exactp{it:1} ... exactp{it:i}. These can be seen post {cmd:tarowi} by issuing the command {it:return list}.

{title:Examples}

{p 8 12}{inp:. tarowi  (1,7\5,4\4,4\1,1), o(row col) r(chi nokey)}{p_end}
{p 8 12}{inp:. tarowi  (1,7\5,4\4,4\1,1)}{p_end}
{p 8 12}{inp:. tarowi  (1 7 \ 5 4 \ 4 4 \ 1 1), r(col exact nokey) o(col)}{p_end}
{p 8 12}{inp:. tarowi  (1 7 1\ 5 4 1\ 4 4 2\ 1 1 1), o(row) r(row exact nokey)}{p_end}
{p 8 12}{inp:. tarowi  MatrixA , o(row col) r(chi nokey exact)}{p_end}

{title:Author}

{p 8 12} Allen Buxton, {p_end}
{p 8 12} Assistant Statistician {p_end}
{p 8 12} Children's Oncology Group {p_end}
{p 8 12} Arcadia, CA {p_end}

{title:Also see}

{p 1 14}Manual: {hi:[R] tabulate} {p_end}

{p 0 19}On-line: help for {help tabi} {help tabulate} {help matrix} {help immed} {p_end}
