.- help for ^opartchi^ [STB-51: sg118] .- . Partitions of Pearson's Chi-square for two-way tables with ordered columns -------------------------------------------------------------------------- . ^opartchi^ column_var [^if^ exp] [^in^ exp] [weight]^, by(^row_var^)^ [^tab^le ^orows^ ^l^oglinear ^sc^ore^(^column_score_var^)^ ^rsc^ore^(^row_score_var^)^] . ^fweight^s are allowed. See help @weights@. . . Description ----------- . This command is suitable for exploratory analysis of data that can be summarised in a two-way contingency table with ordered columns given by ^column_var^ and rows given by ^row_var^. The option ^table^ can be used to @tabulate@ the data showing row percentages. The command provides test statistics that summarise the extent to which the distribution of responses on the ordered scale differs between the rows. The first way in which these distributions may differ is in their location on the ordered scale; the second way is in their dispersion across the ordered scale. . Two types of test statistics are provided. By default, Pearson's Chi-square statistic is partitioned into components that describe the appropriate row differences. The ^loglinear^ option provides comparable deviance statistics from fitting log-linear models to the data. Both of these procedures require the attachment of increasing scores to the ordered columns. By default, increasing integer scores are used but the ^score()^ option can be used to provide user-defined scores. . If the rows also have a natural ordering then the option ^orows^ can be used to obtain a sensitive test of the extent to which location differences increase (or decrease) monotonically across the rows. . The data can be provided either at an individual level (one ordinal outcome value per observation) or at a contingency table level in which case there is a variable in the dataset that contains the observed counts for each cell of the table. The latter requires the use of the optional frequency weighting. . . Options ------- . ^by(^row_var^)^ is required. The variable row_var gives the rows of the contingency table. . ^table^ is optional and displays the two-way contingency table (with row percentages) that is to be analyzed. . ^score(^column_score_var^)^ is an option to supply user-defined scores for the column values instead of using the default increasing integer scores. . ^orows^ is optional and should only be used where row_var is an ordinal variable. This option displays the nested test for trend within the location component of row differences. . ^rscore(^row_score_var^)^ is an option to supply user-defined scores for the row values instead of using the default increasing integer scores. . ^loglinear^ is optional. Specifying this option displays deviance statistics from log-linear models as well as the counterpart Pearson's chi-square partitions. . . Examples -------- . *Individual-level data ^opartchi recovery, by(treatmnt)^ ^opartchi recovery, by(treatmnt) loglin orows rscore(tr5)^ . ^egen midrank=rank(recovery) ^opartchi recovery, by(treatmnt) score(midrank)^ * Contingency table data ^opartchi pay_grp [fweight=counts], by(state) . . Authors ------- . Rory Wolfe Royal Children's Hospital, Australia wolfer@@cryptic.rch.unimelb.edu.au . . Also see -------- . Manual: ^glm, fam(poisson) link(log)^ for log-linear modelling On-line: help see @tabulate@, @kwallis@, @nptrend@, @ologit@ FAQ: @http://www.stata.com/support/faqs/stat/trend.html@ STB: STB-44 sg88 (@gologit@ if installed)