title: Tests of marginal homogeneity and special cases.
abstract: The analysis of two-way contingency tables is common in clinical studies. In addition to summary counts and percentages, statistical tests or summary measures are often desired. If the data can be viewed as two categorical measurements on the same experimental unit (matched pair data) then a test of marginal homogeneity may be appropriate. The most common clinical example is the so called 'shift table' whereby a quantity is tested for change between two time points. The two principal marginal homogeneity tests are the Stuart Maxwell and Bhapkar tests. At present, SAS software does not compute either test directly (for tables with more than two categories) and a programmatic solution is required. Two examples of programmatic SAS code are found in the current literature. Although accurate in most instances, they fail to produce output for certain tables ('special cases'). After summarizing the mathematics behind the two tests, a SAS macro is presented, which produces correct output for all tables. Finally, several examples are coded and presented with resultant output.
authors.affiliation: Strategic Staffing Solutions, St. Louis, MO, USA. dunnigan_k@yahoo.com
authors.forename: Keith
authors.initials: K
authors.lastname: Dunnigan
mesh_terms: D002986:Clinical Trials as Topic / Q000379:methods*; D003627:Data Interpretation, Statistical; D006801:Humans; D015233:Models, Statistical; D008962:Models, Theoretical; D012984:Software; D013997:Time Factors
keywords: Bhapkar; Maxwell; Stuart; generalized McNemar; marginal homogeneity; matched pair