An Overview of New Results in Cochran – Mantel – Haenszel Testing

J.C.W. RAYNER* National Institute for Applied Statistics Research Australia, University of Wollongong, Wollongong, Australia and School of Mathematical and Physical Sciences, University of Newcastle, Newcastle, Australia Email: John.Rayner@newcastle.edu.au and Paul RIPPON School of Mathematical and Physical Sciences, University of Newcastle, Newcastle, Australia Email: Paul.Rippon@newcastle.edu.au


Introduction
The Cochran-Mantel-Haenszel (CMH) methodology is a suite of tests applicable to particular tables of count data.The data are counts of the number of times the ith of t treatments results in an outcome in the hth of c categories on the jth of b blocks or strata.Inference is conditional on the treatment and outcome totals on each stratum being known before sighting the data.The CMH tests are applicable to more complex designs than randomised blocks, but the analysis of randomised blocks data when the responses are categorical rather than continuous is certainly an important application of the CMH tests.This overview will first review the traditional CMH tests and then explore new alternative presentations of the ordinal CMH tests.These could be used to calculate the test statistics but their main use will perhaps be to develop intuition about CMH testing.Next the ordinal CMH tests will be extended so they can be used to test for higher moment effects.One rational for developing these extensions was to enable a comparison between the nonparametric ANOVA tests introduced in Rayner and Best (2013), Rayner et al. (2015) and Rayner (2017).These tests permit univariate moment assessments beyond the mean, and bivariate assessments beyond the (order (1, 1) ) correlation.The nonparametric ANOVA tests are therefore briefly reviewed before considering the CMH extensions.Finally unconditional analogues of the extended CMH tests will be developed.

The CMH tests
The Cochran-Mantel-Haenszel (CMH) tests are a class of nonparametric tests used to nonparametrically analyze tables {Nihj} of count data of a particular structure.Specifically Nihj counts the number of times treatment i is classified into outcome category h in the jth stratum, i = 1, …, t, h = 1, …, c and j = 1, …, b.Strata are independent, and the treatments present in each stratum are fixed by design.
Dot notation is used to reflect summation over a subscript.In the traditional CMH tests (Landis et al., 1978, 1979, Davis, 2002) • the strata totals • the treatment totals within strata, • general association (GA) ( 2 In parentheses are the asymptotic null distribution of the test statistics.The test statistics are quadratic forms with vectors using the table counts and some of the covariance matrices involving Kronecker products.They will be denoted by SOPA, SGA, SMS and SC. This set-up is appropriate for categorical randomised block data.While the CMH methodology is appropriate more generally, it won't accommodate more complex designs such as Latin square, multifactor and many other designs.However it is an extremely important analysis tool for randomised blocks when the responses are categorical rather than continuous.In consumer studies with just about right (JAR) responses such as the Jams Example following, when c is small the randomised block F test will often be invalid in spite of the well-known ANOVA robustness.Two examples will now be introduced.They will be reconsidered throughout this article.
Homosexual Marriage Example.Scores of 1, 2 and 3 are assigned to the responses agree, neutral and disagree respectively to the proposition "Homosexuals should be able to marry" and scores of 1, 2 and 3 are assigned for the religions fundamentalist, moderate and liberal respectively.Agresti (2002) finds SGA takes the value 19.76 with 2 4 χ p-value 0.0006, SMS takes the value 17.94 with 2 2 χ p-value 0.0001, and SC takes the value 16.83 with 2 1 χ p-value less than 0.0001.From these tests we conclude there is strong evidence of an association between the proposition responses and religion.In particular there is evidence of mean differences in the responses and of a (linear -linear) correlation between responses and religion.no evidence of a correlation effect: as we pass from jam A to B and then to C there is no evidence of an increasing (or decreasing) response.

The Nominal CMH tests
The CMH MS test assumes that response categories are ordered while the CMH C test assumes that both treatment categories and response categories are ordered.It is therefore appropriate to label these as ordinal CMH tests, while the OPA and GA CMH tests, that make no assumption about ordering, can be called nominal CMH tests.Scores for the ordered categories are needed to apply the ordinal tests, while no scores are required for the nominal tests.
It is important to note that the traditional CMH tests are conditional tests, conditional on the treatment totals within strata, , and the outcome totals within strata,


being known prior to collecting or sighting the data.For randomised block data in which the responses are untied ranks the marginal totals are known before collecting the data (in every block each treatment is applied once and each response is a rank that is assigned once), while that is not the case for data such as in the Homosexual Marriage Example.
For conditional testing the distribution theory involved in determining means and covariance matrices uses a product extended hypergeometric distribution.For each stratum since the row and column totals are known, the counts Nihj follow an extended hypergeometric distribution.Moreover since the strata are mutually independent, a product distribution is appropriate for the collection of these strata counts.
To define the CMH GA test statistic SGA, first define the vector of counts on the jth stratum Uj =  .
Using the extended hypergeometric distribution, it may be shown, as in Landis et al. (1978), that in which, after writing Here ⊗ is the Kronecker or direct product.The CMH GA test statistic is a quadratic form using U • -E[U • ] and an inverse of cov( ) .Again the covariance matrix is calculated using the product extended hypergeometric distribution.The overall partial association statistic so derived is given by The difference between the two tests is that the CMH GA test is seeking to detect average partial association while the CMH OPA test is seeking to detect overall partial association.The former is more focused, with (c -1)(t -1) degrees of freedom versus b times that for CMH OPA statistic.The degrees of freedom are the dimension of the alternative hypothesis space.The CMH OPA test is seeking to detect very general alternatives to the null hypothesis and will have relatively low power for these alternatives.The CMH GA test seeks to detect fewer alternatives and will have more power than the CMH OPA test for these alternatives.However, CMH OPA test will have some power for alternatives to which the CMH GA is insensitive.In other contexts more focused tests have been constructed using components of an omnibus test statistic.This idea will be taken up subsequently.
An alternative test for overall partial association is the Pearson test, with statistic This is an unconditional test that does not assume all treatment and outcome categories are known before sighting the data.The difference between SOPA and TOPA is merely the factor Likewise general association can be tested for using a Pearson test for the two-way table of counts {Nih • }, TGA say.The Pearson test statistics TOPA and TGA will have the same asymptotic distributions as the corresponding conditional tests.Most users will have more familiarity with the unconditional tests and most packages will have routines for their calculation even if they don't have routines for CMH tests.
Subsequently the main focus will be the CMH ordinal tests.

The Ordinal CMH tests
4.1.CMH mean scores test Suppose, as before, that Nihj counts the number of times treatment i is classified into outcome category h in the jth stratum, i = 1, …, t, h = 1, …, c and j = 1, …, b.Assume that outcomes are ordinal and assign the score bhj to the hth response on the jth stratum.All marginal totals are assumed to be known, so the product extended hypergeometric model is assumed.
in which all unknown parameters are estimated by maximum likelihood under the null To give cov(Mj) first define Then it may be shown that cov(Mj) = 2 T j j S V .Since cov(Mj) is not of full rank the usual approaches, such as dropping appropriate treatment and/or outcome categories, or using a generalised inverse, can be used.Software exists to calculate SM.
Note.The mean scores statistic depends on the scores assigned to the response categories.Thus the statistic could be written SM({bhj}) to emphasise this dependence.
Aside.The derivation of cov(Mj) requires routine but tedious algebra.If δuv is the Kronecker delta, = 1 if u = v and zero otherwise, using standard distribution theory for the product extended hypergeometric distribution, E[Nihj] = 晻 晻 / i j hj j n n n and the covariance between Nihj and N

It follows that var(
hj ihj These lead to the stated covariance matrix. Under the null hypothesis of no treatment effects the distribution of SM can be shown to be asymptotically 2 1 − t χ ; see Landis et al. (1978).

The CMH correlation test
The CMH correlation tests assume that the treatment and response variables are both measured on either the ordinal or the interval scale, and that for the ith treatment the scores are ahi, i = 1, … , t, and on the jth stratum the response scores are bhj, j = 1, … , b.
The null hypothesis of no association between the treatment and response variables having adjusted for the b strata, is tested against the alternative that across strata there is a consistent association, positive or negative, between the treatment scores and response scores.Take The CMH correlation (CMH C) statistic is C 2 /var(C) = SC say.The derivation of var(C) is relatively complex if scalars are used, but is routine using Kronecker products.
To derive var(C) first define aj = (a1j, …, atj) Recall from section 2 that with Landis et al. (1978)   cov because both factors in the Kronecker product are scalars.Finally var(C) =  j j C ) cov( because counts in different strata are mutually independent.The CMH correlation statistic SC is now fully specified.
The Central Limit Theorem assures the asymptotic normality of C, so as the total sample size approaches infinity SC has asymptotic distribution 2 1 χ .Again see Landis et al. (1978).

Alternative presentations of the ordinal CMH test statistics
In this section the focus is on alternative expressions for the ordinal CMH test statistics.In the case of randomised block data simple expressions are given for the ready calculation of the test statistics.The expression for the correlation statistic is more general and quite insightful, so that will be considered first.

The CMH correlation statistic
Using the definitions previously given for VTj and VCj we have . With appropriate divisors the SXXj etc. give unbiased estimators of the stratum variances and covariances.With these definitions The expression here uses the SXYj etc., familiar in formulae for regression coefficients.
Three special cases will be considered: (1) the data consists of one stratum only; (2) the treatment scores are independent of the strata: aij = ai for all i and j; and (3) the randomised block design (in section 5.2).In the second case SXX is constant over strata.This gives a slight simplification of the SC formula.See the Jams Example below.If the data come from a randomised block design a considerable simplification is possible if the same treatment and response scores are used on each stratum or block.See section 5.2.
In the first case the CMH correlation statistic simplifies to , in which rP is the Pearson correlation coefficient.This is well known.See, for example, Davis (2002, p.253).
If we now write rPj for the Pearson correlation in the jth stratum, it follows that since Homosexual Marriage Example.These data were considered in section 1; they are given in Table 1.Noting that stratum 1 is school and stratum 2 is college, we find SXX1 = 50, SXY1 = -9 and SYY1 = 39.7333,rP1 = -0.2019and the CMH C statistic for school takes the value 2.4055 with 2 1 χ p-value 0.1209.Similarly SXX2 = 51.6712,SXY2 = -23.8904,SYY2 = 42.6301,rP2 = - 0.5090 and the CMH C statistic for college takes the value 18.6558 with 2 1 χ p-value 0.0000.From these the value of the CMH C statistic and its χ 2 p-value are confirmed: it was previously noted that SC takes the value 16.8328 with 2 1 χ p-value 0.0000.Clearly there is an insignificant Pearson correlation for schools and a highly significant Pearson correlation for college.The latter dominates the former, so that overall there is strong evidence of a correlation effect: as religion becomes increasingly liberal there is greater agreement with the proposition that homosexuals should be able to marry.This is due mainly to the stratum college.
Whiskey Example.O' Mahony (1986, p.363) gave the data in Table 3, which were analysed in Rayner and Best (2001).They use mid-rank scores and find the Spearman correlation, which takes the value 0.73.In testing if this is zero against two-sided alternatives they give a Monte Carlo p-value of 0.09 and an asymptotic p-value of 0.04.
Using scores 1, 2 and 3 for grade and 1, 5 and 7 for years of maturity, we find SXX = 6, SXY = -12 and SYY = 43.5.It follows that the Pearson correlation is -0.7428 and the CMH C statistic takes the value 3.8621 with 2 1 χ p-value 0.0494.There is some evidence that as maturity increases so does the grade of the whiskey.Jams Example.Here as there are eight strata hand calculation is possible if a little tedious.Because SXX is constant over strata it is not too much extra work to calculate SXY, SYY, the Pearson correlation, the CMH correlation statistic and its p-value on each stratum.We find SXX = 2 on all strata and SC = 1.1029 with 2 1 χ p-value 0.2936.There is no significant correlation effect, which would, if present, indicate that as we pass from jam A to B to C there is increasing (or decreasing) sweetness.It could be that overall there is no correlation effect with the contrary being the case in a minority of strata.That is not the case here; no stratum shows any evidence of a slight correlation effect.Here this is hardly surprising; with only three observations in each stratum there can be little power in testing for a correlation.
If there is interest in the contributions to the correlation from individual strata this is a reasonable approach.However, if there is not, then for the randomised blocks design with the same treatment scores in each stratum a considerable simplification is possible.This is now considered.

The randomised blocks design
As developed the CMH methodology doesn't apply to Latin square, multifactor and many other designs.However it is an extremely important analysis tool for randomised blocks when the responses are categorical rather than continuous.See, for example, Davis (2002, Chapter 8) who uses CMH methods to analyse repeated measures categorical data.
In the case of the randomised block design a considerable simplification of the CMH MS statistic is possible.In this case j i n • = 1 for all i and j.Consequently = 1/t.Substituting in the definitions given in Section 4 ultimately gives − in which F is the ANOVA F test statistic.A derivation of this relationship is given in the supplementary material.The significance of this result is that the CMH MS and ANOVA F tests are formally equivalent.
Coincidentally the given relationship is the same as that relating the Friedman test statistic and the F test statistic using the ranks as data.P-values may be obtained by referring SM to its 2 1 − t χ distribution, or F to its F(t-1),(b-1)(t- 1) distribution, or otherwise.An empirical study would be required to assess which is the more reliable in the sense of closeness to, say, permutation test p-values.In the examples we have analysed there has been little difference in these methods.
For the CMH C test statistic with the same scores in every stratum in which C is the sum of the products of the treatment sums and the centred treatment scores, S XX is the sum of the squares of the centred treatment scores and YYj j S  may be read from the output for a one-way ANOVA.Again the derivation is given in the supplementary material.Jams Example.For the jams data ai = 1, 2 and 3, so S XX 2 = 2. From a one-way ANOVA with judges as treatments,  j YYj S 2 = 22 3 2 .This can be confirmed by summing across the SYY row in Table 4.By summing the columns in Table 2 the treatment score sums are found to be 18, 30 and 23, and since the centred treatment scores are -1, 0 and 1, C = -18 + 0 + 23 = 5.

Nonparametric ANOVA
A suite of tests that can analyse the same data as the CMH tests is the nonparametric ANOVA tests of Rayner and Best (2013), Rayner et al. (2015) and Rayner (2017).However, these tests are applicable for a wider range of designs and are more flexible than the CMH tests, in that they assess both moment effects and generalised correlation effects of all orders, although only lower order tests are applied in practice.The extension of the CMH tests considered in this section makes the CMH tests equally as flexible as the nonparametric ANOVA tests.
The nonparametric ANOVA tests are nonparametric in that they are based on weak multinomial models incorporating smooth alternatives.The sampling distributions of the test statistics are not known, but the usual F distributions provide approximations that agree very well with permutation test results, and, of course, are very convenient.Responses for both the CMH and nonparametric ANOVA are categorical, although use of the term ANOVA suggests continuous responses.In fact, the issue of whether the data are categorical or continuous is of no practical importance.The nonparametric ANOVA tests are robust to even highly categorical data, and while the sampling distributions for the CMH tests are asymptotic, they are quite good even for small sample sizes.A simulation study in Rayner & Best (2018) showed that for randomised blocks data both suites of tests showed good agreement between their nominal significance levels and the test sizes achieved.
It is interesting to note that if the data are ranks then the first order nonparametric ANOVA F tests are equivalent to the Kruskal-Wallis when the design is the completely randomised design and the Friedman for the randomised blocks design.See, for example, Rayner (2016, section 2.5).
Nonparametric ANOVA may be applied to designs consistent with the general linear model while of course, the design for the CMH extensions is much more restrictive.There are two types of nonparametric ANOVA: ordered and unordered.For the unordered analysis orthonormal polynomials on the response variable up to a given level, typically three, are constructed.For any given ANOVA the analysis with the responses transformed by the order r orthonormal polynomial is called the order r analysis.Analyses of different orders are uncorrelated, so significance or not at any given order doesn't affect the significance or not at any other order.
For a given design there will usually be several effects, such as main effects, interactions and so on.The order r analysis tests null hypotheses that the responses transformed by the rth orthonormal polynomial are consistent across levels of these effects.Suppose, for example, that one effect is the application of treatment A. Analyses of successive orders seek to assess whether or not the responses transformed by the first, second etc. order orthonormal polynomials are consistent across levels of treatment A.
The ordered analysis assumes that at least one of the independent variables is ordered in the sense that the levels of the effects corresponding to that variable are ordered.Orthonormal polynomials are constructed on the response variable and on each ordered independent variable.The responses are transformed by an orthonormal polynomial of particular order, and each independent variable is also transformed by an orthonormal polynomial of particular order.Then the product of the transformed variables is taken.A new, reduced design is formed from the original, without the independent variables that are ordered and with a new response, the product of orthonormal polynomials.ANOVAs of interest on the reduced design are then performed.These analyses assess generalised correlations, for which see Rayner and Beh (2009).As with the unordered analysis the conclusions from one ANOVA do not affect the conclusions from other ANOVAs.Of most interest are the usual order (1, 1) correlation that assesses linear-linear effects, and order (1, 2) and (2, 1) correlations that assess umbrella effects.
Both the extended CMH tests and the unordered and ordered nonparametric ANOVAs assume the existence of the orthonormal polynomials.An orthonormal polynomial of order r requires the existence of moments up to order 2r while the corresponding orthogonal polynomial requires the existence of moments up to order r + 1.However, as responses are classified into, say, c classes, it is only possible to calculate moments of the responses up to order c -1. Thus moments, orthonormal polynomials and hence tests of certain orders are not available for some parameter choices.

Extensions of the CMH mean scores and correlation tests
To construct extensions to SM consider the scores bhj on the jth stratum.A common choice of scores to give a 'mean' assessment would be the natural scores 1, 2, …, c on all strata.However a 'dispersion' assessment could be given by choosing scores 1 2 , 2 2 , …, c 2 and similarly higher order powers might be of interest: bhj = h r .One problem with using the scores bhj = h r is that the test statistics are correlated.Thus the significance or not of the test for any order may affect the significance or not of tests at other orders.We now look at using more general scores with the objective of having uncorrelated test statistics.To this end now denote order r scores that are not stratum specific by / with r, s = 0, 1, …, t -1 and with a ij (0) = 1 for i = 1, …, t.Both sets of scores may be stratum specific.Define SCrs as before, but using Jams Example.For the jams data the CMH MS and unordered nonparametric ANOVA p-values are exactly the same.This is because for a randomised block design the CMH MS tests using the ANOVA F p-value use the same orthonormal functions, based on the category weights, as the unordered nonparametric ANOVA.
For the jams data the p-values using the F distribution are 0.0278, 0.2435 and 0.5554, and those using the 2 1 − t χ p-distribution are 0.0082, 0.1116 and 0.3802 respectively.At the 0.05 level there is evidence of mean differences in the scores for jams, but not of higher moment effects.
We may test for generalised correlation effects using both CMH GC and nonparametric ANOVA.In the Table 5 the nonparametric ANOVA cells give p-values, first using the t-test and second using the Wilcoxon signed ranks test.
Only the (1, 2) p-value using the t-test is less than 0.05.The treatment sums for jams A, B and C are 18, 30 and 23 respectively.It seems that in passing from jam A to B and then C there is evidence that the sweetness is assessed to increase and then decrease.
Here and in other examples we find that the CMH extensions and the corresponding nonparametric ANOVA tests give fairly similar conclusions.The CMH C extensions of orders (1, 1), (1, 2), (2, 1) and (2, 2) were calculated.An intermediate step gave the generalised correlations of these orders for each stratum.Again, the (1, 1) correlation gave very strong evidence of being non-zero.The others were not significant at the commonly used levels of significance.See Table 6.The unordered nonparametric ANOVA gave p-values of less than 0.0001 for first order and 0.3719 for second order.As with the CMH MS extensions there is strong evidence of a mean difference between religions but no evidence of a second order effect.

Development of unconditional CMH tests
It was noted in section 3 that the nominal CMH test statistics SOPAS and SGA had analogues denoted by TOPAS and TGA.These were based on Pearson tests.The nominal CMH tests were identified as conditional tests while the analogues, since they are not based on the product extended hypergeometric distribution, are unconditional tests.Since the unconditional Pearson tests are very familiar, they would be the tests of preference for most users.It is of interest to develop unconditional analogues of the ordinal CMH tests.This was done in Rayner and Best (2017a).
For singly ordered two-way tables an unconditional model is explored in Rayner and Best (2001, Chapter 4).On the jth stratum define orthonormal polynomials {ωuj(h)} on Vuij reflects the contribution of treatment i to the order u effect on stratum j.Rayner and Best (2001, Chapter 4) show that In particular 1 gives an overall mean assessment of the consistency of treatments, gives an overall dispersion assessment of the consistency of treatments, and so on.
The  j i uij V , 2 partition  j j X 2 P = TOPAS.
Average assessments may be obtained by summing over strata.Put fj = ( Of course TM1, gives an unconditional assessment of mean score differences in treatments in contrast with SM that gives a conditional assessment of mean score differences in treatments.The TMu are all asymptotically 2 1 − t χ distributed.Note that the tests for overall and even average association may have quite large degrees of freedom.This means they are seeking to detect very general alternatives to the null hypothesis of no association.The test for average partial association may well be more focused than that for overall association, but may well still have low power because (t -1)(c -1) is quite large: the alternative to the null is too general.The moment tests here, and the generalised correlation tests following, offer focused tests for alternatives that are important and easy to understand.
For correlation tests results analogous to those in Rayner and Best (2001, section 8.2) for two-way tables are needed.There a single multinomial {Nij} that follows a multinomial distribution with total count n = N •• and cell probabilities {pij} with p •• = 1 is assumed.Instead we need to assume {Nij} follows a multinomial distribution with total count • i n and cell probabilities {pij} with • i p = 1.Nevertheless it may be shown that similar results apply.
In particular if {πr(i)} are orthonormal on the { • i p } with π0(i) = 1 for all i, if {ωs(j)} are orthonormal on the { j p • } with ω0(j) = 1 for all j and if Vrs =   V may be summed over strata to give an overall order (r, s) correlation assessment.Because strata are independent  j rsj V 2 will have an asymptotic 2 b χ distribution.In particular  j j V 2 11 will give an overall unconditional assessment of the usual (that is, order (1, 1) generalised) correlation.Since the sum of the strata Pearson statistics is the overall Pearson statistic, the  j rsj V 2 numerically partition the overall Pearson statistic.
For a comparison of the conditional and unconditional analyses for the Homosexual Marriage Example, see Table 7. Rayner and Best (2017a) note that care must be exercised in the application of these tests.Any response category that included no observations would normally be deleted.For the jams data see Table 2 to confirm that overall there are no null categories; however that is not the case within each stratum.For example, the first judge gives scores of 2, 3 and 3.The first, fourth and fifth categories include no responses.That means X is not defined, as is the case for both SOPAS and TOPAS.It is some consolation that TGA is defined.  .The Vi are differences between the sum of the treatment scores over all strata and the mean of these.Now To simplify this first put xij =  h ihj If the data {xij} are analysed as a one-way ANOVA or completely randomised design with blocks as treatments then the error sum of squares is TSS + ESS and is given by Further, for the two-way ANOVA the treatment sum of squares is (note that x means the mean of {xi} while to be known prior to sighting the data: they are not random variables.Inference is conditional.The traditional CMH tests assess• overall partial association (OPA) stratum.For large stratum counts this will make little difference in the values of SOPA and TOPA.
to the square of a linear combination of the Pearson correlations in each stratum.The proportionality factor ensures SC has the 2 1 χ distribution.This formula demonstrates how the Pearson correlations in each stratum contribute to the overall correlation measure. j }. Then for r ≠ s = 1, 2, …, t it can be shown that cov( the ith score sums of different orders M i r are uncorrelated.In this sense the information provided by the scores sums of different orders for the same treatment is not related.To construct extensions to SC suppose that instead of a single set of outcome scores {bhj}, we consider c sets of scores, { ) (s hj b } for s = 0, 1, …, c -1. Moreover suppose the scores Preprints (www.preprints.org)| NOT PEER-REVIEWED | Posted: 28 June 2018 doi:10.20944/preprints201806.0471.v1Peer-reviewed version available at Stats 2018, 1, 8; doi:10.3390/stats1010008areorthonormal in the sense that h = 1, …, c.Similarly instead of a single set of treatment scores {aij}, consider t sets of scores, { ) (r ij a } for r = 0, 1, …, t -1 and suppose these scores are orthonormal in the sense can be shown that the SCrs are uncorrelated.SeeRayner and Best (2018) for details.
u assessment of the consistency of treatments in the jth stratum.It has asymptotic distribution 2 order u assessment of the consistency of treatments over all b strata and has asymptotic distribution 2 . An average order u assessment of the consistency of treatments can be based on the quadratic form ( partition the Pearson statistic and are asymptotically standard normal score test statistics.In particular V11/√n is the Pearson product moment correlation for grouped data, and, if the scores are ranks, V11/√n is the Spearman correlation.To use the results immediately above in the context here first define, on the jth stratum, orthonormal polynomials {πrj(i)} on ( π0(i) = 1 for all i, and {ωsj(h)} on j p 1 ( • , …, cj p • ˆ) with ω0(j) = 1 for all j.Next define, for r = 1, …, t -1 and s = 1, …, (r, s) generalised correlations on stratum j. Results in Rayner and Best (2001, section 8.2) (translated to the current context) show that  on the jth stratum.The 2 rsj jth block there is only one observation of treatment i, so for only one value of h is nihj = 1; otherwise nihj data set {xij}.For the two-way ANOVA of these data write TSS for the treatments sum of squares and ESS for the error sum of squares.
. If these are analysed as a one-way ANOVA or completely randomised design with blocks as treatments then the error sum of squares is

TABLE 1
Opinions on homosexual marriage by religious beliefs and education levels for ages 18 to 25Jams Example.Three plum jams, A, B and C are given JAR sweetness codes by eight judges as in the Table2.Here 1 denotes not sweet enough, 2 not quite sweet enough, 3 just about right, 4 a little too sweet and 5 too sweet.The treatment sums for jamsA, B and C are 18, 30 and 23

TABLE 4
Analysis of Jams data

TABLE 5
Homosexual Marriage Example.For the homosexual marriage data, the CMH MS extensions of first and second order yield p-values of 0.0000147 and 0.2732 respectively.