# Components of Pearson's Statistic for at Least Partially Orderedm-Way Contingency Tables

Authors: J. C. W. Rayner; Eric J. Beh
Journal: Journal of Applied Mathematics and Decision Sciences
 (2009)

---

## Abstract

For at least partially ordered three-way tables, it is well known how to arithmetically decompose Pearson'sXP2 statistic into informative components that enable a close scrutiny of the data. Similarly well-known are smooth models for two-way tables from which score tests for homogeneity and independence can be derived. From these models, both the components of Pearson's XP2 and information about their distributions can be derived. Two advantages of specifying models are first that the score tests have weak optimality properties and second  that identifying the appropriate model from within a class of possible models gives insights about the data. Here,  smooth models for higher-order tables are given explicitly, as are the partitions of Pearson's XP2 into components. The asymptotic distributions of statistics related to the components are also addressed.


---

## Body

## 1. Introduction

In [1, 2] it is shown  how, for at least partially ordered three-way tables, to arithmetically decompose Pearson’s XP2 statistic into informative components that enable a close scrutiny of the data. They focus on three-way tables as being indicative of higher-order tables. Here, we give models for arbitrary multiway tables that are at least partially ordered. We discuss the arithmetic decomposition of XP2 into components, giving explicit formulae for these components. This enables XP2 to be partitioned into meaningful X2-type statistics. Using extensions of models for two-way tables discussed in [3], the asymptotic distribution of statistics related to these components may be given.At the onset, we should say what we mean by “ordered.’’ A random variable is a mapping from the sample space to the real line. It is ordered if and only if the ordering of the range is meaningful. So, for example, a range containing only zero and one, denoting male and female, would not usually be considered meaningful. However, it would usually be considered meaningful if the zero and one denoted low and high, respectively. A variable is ordered if and only if it reflects a random variable that is ordered rather than not ordered, or nominal. A table is completely ordered if and only if all variables are ordered. It is partially ordered if and only if at least one but not all variables are ordered.To give precedence, we observe here that the arithmetic decomposition of Pearson’sXP2 statistic for two- and three-way tables can be shown quite compactly using results from [3, Chapter 4, Theorems  2.1 and  2.2, pages 90-91 and Theorem  5.2, page 101]. It is shown there that for contingency tables Lancaster’s ϕ2 is equal to the sum of the squares of the elements of a vector θ  in the subsequent models. In a parallel manner, working with observed proportions {Nij/n}, it can be shown that XP2 is equal to the sum of the squares of components. This observation applies to verifying the results in [1, 2]. Moreover, precedence should be given to the work in [3, Chapter 12] for material throughout this paper.We also note that the work in [4] considered models for ordered two-way contingency tables. In [4, Chapter 3], an extended hypergeometric model is used when both row and column marginal totals are known. This is not a smooth model and here we will not discuss either it or its extensions further. In [4, Chapter 8], doubly ordered models are considered, and these will be generalised in Section 2 in what follows.In treating a singly ordered table, the work in [4, Chapter 4] assumed the total count for each treatment is known before sighting the data, and this leads to a smooth product multinomial model. If the treatment totals are not known before sighting the data, the resulting model is a single multinomial with cell probabilities modelled the same way as when the treatment totals are known before sighting the data. The models in [1, 2] are single multinomials, following the second approach. However, it is clear that, in general, for partially ordered tables, there are a multitude of possible models, depending on which marginal totals are assumed known before sighting the data. In all cases, the logarithms of the likelihoods are, apart from unimportant constants, the same. Henceforth, we will consistently work with product multinomials and note that the distributional results developed apply to the multitude of models indicated.The outline of this paper is as follows. In Section2, the more routine case of completely ordered multiway tables is discussed. The balance of the paper is about the more complicated partially ordered tables. In Section 3, the work of [4] on partially ordered tables is reviewed. In Section 4, the work in [1, 2] is reviewed and extended using smooth models. Section 5 gives the generalizations to arbitrary multiway partially ordered tables.


## 2. Completely Ordered Multiway Tables

For anm-way I1×I2×⋯×Im, completely ordered table of counts {Nv1⋯vm}, Pearson’s XP2  is given by(2.1)XP2=∑v1=1I1⋯∑vm=1Im(Nv1⋯vm-E[Nv1⋯vm])2E[Nv1...vm].
An extension of the approach in [1] demonstrates that XP2 has an arithmetic decomposition:(2.2)XP2=∑u1=0I1-1⋯∑um=0Im-1Zu1⋯um2,
in which the components Zu1⋯um,  u1=0,…,I1-1,…,  um=0,…,Im-1, are given by(2.3)Zu1⋯um=n∑v1=1I1⋯∑vm=1Imau1(v1)⋯aum(vm)pv1⋯vm.
Here n=∑ν1=1I1⋯∑νm=1ImNν1⋯νm and for j=1,…,m, {auj(∙)} is orthonormal on {p∙⋯∙vj∙⋯∙}, in which pv1⋯vm = Nv1⋯vm/n and p∙⋯∙vj∙⋯∙ is obtained from pv1⋯vm by summing out all variables other than vj. Furthermore, the orthonormal systems all have zeroth term identically one. This work builds on the iconic work of Oliver Lancaster, for which see [3], and [3, Chapter 12] in particular.It is routine to show that the componentsZu1⋯umare asymptotically multivariate normal, since an arbitrary linear combination of these variables is asymptotically normal by the central limit theorem. Utilizing the orthonormality of the {auj(∙)}, it can be shown that all components have expectation zero, variance unity, and covariances zero. They are thus asymptotically mutually independent and asymptotically standard normal.One possible smooth model for{Nv1⋯vm} is the multinomial with count total n and cell probabilities {pν1⋯νm} given by(2.4)pν1⋯νm={∑u1=0I1-1⋯∑um=0Im-1θu1⋯umau1(v1)⋯aum(vm)}pν1∙⋯∙⋯p∙⋯∙νm,
in which θ0⋯0=1 and  θ0⋯0uj0⋯0=0 for all uj≥1. This model includes all genuine two, three, and so forth m-way independence models. A routine extension of [4, Theorem  8.1] shows that the score test statistic for testing, that the θu1⋯umare collectively zero against the negation of this is, as before, the sum of the squares of the Zu1⋯um. Moreover, these components have the distributional properties given in the previous paragraph. Generalising [4, Theorem  8.2], this score test statistic is XP2. The score test has the advantage of weak optimality: see, for example, [5]. An additional advantage of this approach is that it can be shown that Zu1⋯um2 is the score test statistic when testing θu1⋯um=0 against θu1⋯um≠0  in an appropriate model. Thus, in an informal sense, every Zu1⋯um is a detector of the corresponding  θu1⋯um.The degrees of freedom associated withXP2 are the number of θu1⋯um (and hence Zu1⋯um) in the model, excluding those that are by convention always zero or one. The degrees of freedom are thus(2.5)∏i<j(Ii-1)(Ij-1)+∏i<j<k(Ii-1)(Ij-1)(Ik-1)⋯+(I1-1)(I2-1)⋯(Im-1)=I1×I2×⋯×Im-1-(I1-1)-(I2-1)-⋯-(Im-1).
The left-hand side consists of the degrees of freedom associated with all genuine two-way, three-way, and so forth m-way models, while the right-hand side is the number of cells minus one for the constraint n=∑ν1=1I1⋯∑νm=1ImNν1⋯νm (reflecting that the sample size is known before sighting the data) minus the degrees of freedom associated with all one-way (essentially goodness of fit) models. For the happiness example in [1] I1=3, I2=4, I3=5 and substituting in the aforementioned formulae, there are 50 degrees of freedom.


## 3. Two-Way Singly Ordered Tables

In [4, Section  4.4] two-way tables are discussed. We report on that discussion using our subsequent convention that ordered categories precede unordered categories. Tables {Nwz} are modelled by product multinomials, with the zth column being multinomial with total counts n∙z and cell probabilities:(3.1)pwz={1+∑u=1I1θuzau(w)/n∙z}pw∙,
for w=1,…,I1-1. Note that the probabilities in the I1th row are found by difference:  pI1z=1-p1z-⋯-p(I1-1)z and z=1,…,I2, where pw∙=∑zNwz/n in which n=∑w∑zNwz. The efficient score contains random variables Zuz=(n/n∙z)∑w=1I1au(w)pwz and the information matrix is found to be singular. In order to find a score test statistic in [4, Section  4.4], the model is modified by removing the θs corresponding to the last column because the model is overparameterised: in any row, given the probabilities in the first I2-1 columns and the marginal probability for that row (the average of all probabilities in that row), the probability corresponding to the final column can be readily determined. A quicker approach is now outlined.WriteZu=(Zu1,…,ZuI2)T and ZT=(Z1T,…,ZI1-1T). The n×n identity matrix is written as In;  this will be clear from the context when this, and not the number of rows,  and so forth, is intended. From the information matrix for Z, the covariance matrix for Zu is II2-(n∙an∙b)/n. This is idempotent of rankI2-1. There exists an I2×(I2-1) matrix A such that II2-(n∙an∙b)/n=AAT and ATA=II2-1. We now focus on a smooth model containing just one value of u (the full model is similar). Since the information matrix in terms of θu=(θu1,…,θuI2)T=θ  say is singular, define ϕ  by Aϕ=θ. Then using the results of the lemma in [6, Section  3], the efficient score and information in terms of θ  (Uθ and Iθ) and ϕ  (Uϕ and Iϕ) are related by Uϕ=ATUθ and Iϕ=ATIθA, respectively. It follows that since, in terms of ϕ, the efficient score is ATZu=Yu say, and the information matrix is AT{II2-(n∙an∙b)/n}A=II2-1, the score test statistic in terms of ϕ is YuTYu=ZuT{II2-(n∙an∙b)/n}Zu. Since Yu is asymptotically  NI2-1(0,II2-1), the score test statistic has the χI2-12 distribution, as is otherwise well known.The columns ofA are eigenvectors corresponding to the nonzero eigenvalues of {II2-(n∙an∙b)/n}. The eigenvector corresponding to the zero eigenvalue is (1,…,1)T, so a typical eigenvector may be written 1⊥. The elements of Yu=ATZu are of the form 1⊥TZu, that may fairly be called a contrast between the elements of Zu. They are mutually independent and standard normal. While the Zui are immediately interpretable, they are slightly less convenient than Yui that are orthogonal contrasts and are asymptotically mutually independent and asymptotically standard normal. These contrasts correspond to each order u, u=1,…,I1-1, and reflect comparisons between the levels of the unordered factor. They may, for example, compare the means of the first two levels, the mean of the first two levels with that of the third level, the mean of the first three levels with that of the fourth level, and so on. Such contrasts may be described as Helmertian, from the Helmert matrix. In its simplest form, the Helmert matrix is an orthogonal (n+1)×(n+1) matrix with all the elements of the first row 1/√(n+1) and rth row 1/√[r(r+1)] (r  times),  -r/√[r(r+1)], then all zeros.


## 4. Three-Way Partially Ordered Tables

### 4.1. Singly Ordered Three-Way Tables

For singly orderedI1×I2×I3 tables, a product multinomial model is assumed, with the counts corresponding to the z1th column and z2th layer, z1=1,…,I2 and z2=1,…,I3, being multinomial with total counts n∙z1z2 and cell probabilities:(4.1)pwz1z2=pw∙∙∑u=0I1-1θuz1z2au(w),
for w=1,…,I1, in which θ0z1z2=1. Here and henceforth, the normalisation corresponding to the n∙z factor in pwz in Section 3 is absorbed into the θuz1z2. The components are random variables:(4.2)Zuz1z2=np∙z1∙p∙∙z2∑w=1I1au(w)pwz1z2,
where p∙z1∙=∑w∑z2Nwz1z2/n and p∙∙z2=∑w∑z1Nwz1z2/n. The Zuz1z2 are immediately interpretable [2]), and, by the multivariate central limit theorem, are asymptotically multivariate normal. This does not depend on the smooth model. As in Section 3, for each u, u=1,…,I1-1, we may construct orthogonal contrasts that are asymptotically mutually independent and asymptotically standard normal. These contrasts reflect uth moment comparisons between the levels of the unordered factors.In [2], without a model, it is shown that XP2 is the sum of the squares of the Zuz1z2:(4.3)XP2=∑u=0I1-1∑z1=1I2∑z2=1I3Zuz1z22.
In XP2, it is insightful to separate components corresponding to u=0 and u≠0. Thus(4.4)XP2=∑z1=1I2∑z2=1I3Z0z1z22+∑u=1I1-1∑z1=1I2∑z2=1I3Zuz1z22.
The first summand corresponds to a two-way completely unordered table obtained by summing over rows and may reasonably be denoted by XZ1Z22. The second summation corresponds to a genuinely three-way singly ordered table and may reasonably be denoted by XUZ1Z22.In [2] it is stated that the degrees of freedom associated with XP2 are  I1I2I3-I1-I2-I3+2. This follows because there are (I2-1)(I3-1) degrees of freedom associated with XZ1Z22, and (I1-1)(I2I3-1) degrees of freedom associated with XUZ1Z22.We can argue for these degrees of freedom by, when possible, counting theθuz1z2 or the Zuz1z2. The table corresponding to XZ1Z22 is completely unordered, so there are no θuz1z2 to count. We propose no smooth model, and our components are not appropriate when there is no order. However, the degrees of freedom are known independently to be (I2-1)(I3-1). The table corresponding to XUZ1Z22 has degrees of freedom (I1-1)(I2I3-1) since this is the number of parameters θuz1z2 in the smooth model. There are I2I3 multinomials, each of which has (I1-1) parameters θuz1z2 as the multinomials probabilities sum to one (so the final cell probability is given by difference). In addition, one of the I2I3 multinomials is determined by {pw∙∙} and the remaining multinomials.


### 4.2. Doubly Ordered Three-Way Tables

For doubly ordered tables a product multinomial model is again assumed, with the counts corresponding to thezth layer being multinomial with total counts n∙∙z and cell probabilities:(4.5)pw1w2z=pw1w2∙∑u1=0I1-1∑u2=0I2-1θu1u2zau1(w1)au2(w2),
for w1=1,…,I1, w2=1,…,I2, and z=1,…,I3, in which θ00z=θu10z=θ0u2z=1. The components are random variables:(4.6)Zu1u2z=np∙∙z∑w1=1I1∑w2=1I2au1(w1)au2(w2)pw1w2z
for u1=0,…,I1-1, u2=0,…,I2-1, and z=1,…,I3, where p∙∙z=∑w1∑w2Nw1w2z/n. Again, by the multivariate central limit theorem, the Zu1u2z are asymptotically multivariate normal. This does not depend on the smooth model. For each (u1,u2) pair, as in Section 3, we may construct orthogonal contrasts that are asymptotically mutually independent and asymptotically standard normal. These contrasts reflect bivariate moment comparisons between the levels of the unordered factor. A typical contrast may be (1st,2nd) moment differences between the first two levels reflected by layers.In [2], without a model, it is shown that XP2 is the sum of the squares of the Zu1u2z:(4.7)XP2=∑u1=0I1-1∑u2=0I2-1∑z=1I3Zu1u2z2.
Again in XP2, it is insightful to separate components corresponding to ui=0 and ui≠0. Thus,(4.8)XP2=∑z=1I3Z00z2+∑u1=1I1-1∑z=1I3Zu10z2+∑u2=1I2-1∑z=1I3Z0u2z2+∑u1=1I1-1∑u2=1I2-1∑z=1I3Zu1u2z2.
The first summand is identically zero. The second summand corresponds to a two-way singly ordered table obtained by summing over columns and may reasonably be denoted by XU1Z2. The third summation corresponds to another two-way singly ordered table obtained by summing over rows and may reasonably be denoted by XU2Z2. The final summation corresponds to a genuine three-way doubly ordered table and may reasonably be denoted by XU1U2Z22.In [2] it is incorrectly claimed that the associated degrees of freedom are, as in Section 4.1, I1I2I3-I1-I2-I3+2. The one-way table corresponding to the components with u1=u2=0 is uninformative, and should be ignored. The two-way tables corresponding to precisely one of the u1 or u2 zero are single-ordered, and, as in Section 3, have degrees of freedom (I1-1)(I3-1) and (I2-1)(I3-1), respectively. When neither u1 nor u2 is zero, the corresponding table is a genuine doubly ordered three-way table. There are I3 multinomials, each with (I1-1)(I2-1) parameters θu1u2z in their smooth model, but in fact the final of the I3 multinomials is determined by the {p∙∙z} and the remaining multinomials. So there are (I1-1)(I2-1)(I3-1) degrees of freedom for this final table. In all, the degrees of freedom are(4.9)(I1-1)(I2-1)(I3-1)+(I1-1)(I2-1)+(I1-1)(I3-1)=(I1I2-1)(I3-1).We note that although the degrees of freedom in the Happiness Example of [2] are in error, the P values and conclusions with the correct degrees of freedom are as given there. We recommend the reader refer to this example, examined from two different perspectives in [1, 2], to see the insight and interpretability the components give to data analysis.


## 4.1. Singly Ordered Three-Way Tables

For singly orderedI1×I2×I3 tables, a product multinomial model is assumed, with the counts corresponding to the z1th column and z2th layer, z1=1,…,I2 and z2=1,…,I3, being multinomial with total counts n∙z1z2 and cell probabilities:(4.1)pwz1z2=pw∙∙∑u=0I1-1θuz1z2au(w),
for w=1,…,I1, in which θ0z1z2=1. Here and henceforth, the normalisation corresponding to the n∙z factor in pwz in Section 3 is absorbed into the θuz1z2. The components are random variables:(4.2)Zuz1z2=np∙z1∙p∙∙z2∑w=1I1au(w)pwz1z2,
where p∙z1∙=∑w∑z2Nwz1z2/n and p∙∙z2=∑w∑z1Nwz1z2/n. The Zuz1z2 are immediately interpretable [2]), and, by the multivariate central limit theorem, are asymptotically multivariate normal. This does not depend on the smooth model. As in Section 3, for each u, u=1,…,I1-1, we may construct orthogonal contrasts that are asymptotically mutually independent and asymptotically standard normal. These contrasts reflect uth moment comparisons between the levels of the unordered factors.In [2], without a model, it is shown that XP2 is the sum of the squares of the Zuz1z2:(4.3)XP2=∑u=0I1-1∑z1=1I2∑z2=1I3Zuz1z22.
In XP2, it is insightful to separate components corresponding to u=0 and u≠0. Thus(4.4)XP2=∑z1=1I2∑z2=1I3Z0z1z22+∑u=1I1-1∑z1=1I2∑z2=1I3Zuz1z22.
The first summand corresponds to a two-way completely unordered table obtained by summing over rows and may reasonably be denoted by XZ1Z22. The second summation corresponds to a genuinely three-way singly ordered table and may reasonably be denoted by XUZ1Z22.In [2] it is stated that the degrees of freedom associated with XP2 are  I1I2I3-I1-I2-I3+2. This follows because there are (I2-1)(I3-1) degrees of freedom associated with XZ1Z22, and (I1-1)(I2I3-1) degrees of freedom associated with XUZ1Z22.We can argue for these degrees of freedom by, when possible, counting theθuz1z2 or the Zuz1z2. The table corresponding to XZ1Z22 is completely unordered, so there are no θuz1z2 to count. We propose no smooth model, and our components are not appropriate when there is no order. However, the degrees of freedom are known independently to be (I2-1)(I3-1). The table corresponding to XUZ1Z22 has degrees of freedom (I1-1)(I2I3-1) since this is the number of parameters θuz1z2 in the smooth model. There are I2I3 multinomials, each of which has (I1-1) parameters θuz1z2 as the multinomials probabilities sum to one (so the final cell probability is given by difference). In addition, one of the I2I3 multinomials is determined by {pw∙∙} and the remaining multinomials.


## 4.2. Doubly Ordered Three-Way Tables

For doubly ordered tables a product multinomial model is again assumed, with the counts corresponding to thezth layer being multinomial with total counts n∙∙z and cell probabilities:(4.5)pw1w2z=pw1w2∙∑u1=0I1-1∑u2=0I2-1θu1u2zau1(w1)au2(w2),
for w1=1,…,I1, w2=1,…,I2, and z=1,…,I3, in which θ00z=θu10z=θ0u2z=1. The components are random variables:(4.6)Zu1u2z=np∙∙z∑w1=1I1∑w2=1I2au1(w1)au2(w2)pw1w2z
for u1=0,…,I1-1, u2=0,…,I2-1, and z=1,…,I3, where p∙∙z=∑w1∑w2Nw1w2z/n. Again, by the multivariate central limit theorem, the Zu1u2z are asymptotically multivariate normal. This does not depend on the smooth model. For each (u1,u2) pair, as in Section 3, we may construct orthogonal contrasts that are asymptotically mutually independent and asymptotically standard normal. These contrasts reflect bivariate moment comparisons between the levels of the unordered factor. A typical contrast may be (1st,2nd) moment differences between the first two levels reflected by layers.In [2], without a model, it is shown that XP2 is the sum of the squares of the Zu1u2z:(4.7)XP2=∑u1=0I1-1∑u2=0I2-1∑z=1I3Zu1u2z2.
Again in XP2, it is insightful to separate components corresponding to ui=0 and ui≠0. Thus,(4.8)XP2=∑z=1I3Z00z2+∑u1=1I1-1∑z=1I3Zu10z2+∑u2=1I2-1∑z=1I3Z0u2z2+∑u1=1I1-1∑u2=1I2-1∑z=1I3Zu1u2z2.
The first summand is identically zero. The second summand corresponds to a two-way singly ordered table obtained by summing over columns and may reasonably be denoted by XU1Z2. The third summation corresponds to another two-way singly ordered table obtained by summing over rows and may reasonably be denoted by XU2Z2. The final summation corresponds to a genuine three-way doubly ordered table and may reasonably be denoted by XU1U2Z22.In [2] it is incorrectly claimed that the associated degrees of freedom are, as in Section 4.1, I1I2I3-I1-I2-I3+2. The one-way table corresponding to the components with u1=u2=0 is uninformative, and should be ignored. The two-way tables corresponding to precisely one of the u1 or u2 zero are single-ordered, and, as in Section 3, have degrees of freedom (I1-1)(I3-1) and (I2-1)(I3-1), respectively. When neither u1 nor u2 is zero, the corresponding table is a genuine doubly ordered three-way table. There are I3 multinomials, each with (I1-1)(I2-1) parameters θu1u2z in their smooth model, but in fact the final of the I3 multinomials is determined by the {p∙∙z} and the remaining multinomials. So there are (I1-1)(I2-1)(I3-1) degrees of freedom for this final table. In all, the degrees of freedom are(4.9)(I1-1)(I2-1)(I3-1)+(I1-1)(I2-1)+(I1-1)(I3-1)=(I1I2-1)(I3-1).We note that although the degrees of freedom in the Happiness Example of [2] are in error, the P values and conclusions with the correct degrees of freedom are as given there. We recommend the reader refer to this example, examined from two different perspectives in [1, 2], to see the insight and interpretability the components give to data analysis.


## 5. m-Way Partially  Ordered  Tables

We consider now anm-way table that is at least partially ordered: without loss of generality the first r (≥1) categorical variables are taken as ordered and the remaining s=m-r (≥1) categorical variables are nominal. The notation reflects this convention; the subscripts w reflect ordered categories while the subscripts z reflect nominal categories. Accordingly, the table is denoted by {Nw1⋯wrz1⋯zs}. As in [2] and [4, Chapter 4], we define components of the form(5.1)Zu1⋯urz1⋯zs=n{p∙⋯∙z1∙⋯∙×⋯×p∙⋯∙zs}∑w1=1I1⋯∑wr=1Irau1(w1)⋯aur(wr)pw1⋯wrz1⋯zs,
where pw1⋯wrz1⋯zs= Nw1⋯wrz1⋯zs/n and where {auj(∙)}, p∙⋯∙zj∙⋯∙ and pw1⋯wrz1⋯zs are defined similarly to the above. Again, by the multivariate central limit theorem, the Zu1⋯urz1⋯zs are asymptotically multivariate normal. This does not depend on the smooth model.By manipulations similar to those for the three-way case, it is possible to argue that(5.2)XP2=∑u1=0I1-1⋯∑ur=0Ir-1∑z1=1Ir+1⋯∑zs=1ImZu1⋯urz1⋯zs2.
By separating components corresponding to ui=0 and ui≠0,XP2 can be partitioned as follows:(5.3)XP2=∑z1=1Ir+1⋯∑zs=1ImZ0⋯0z1⋯zs2+∑i=1r∑ui=1Ii-1∑z1=1Ir+1⋯∑zs=1ImZ0⋯0ui0⋯0z1⋯zs2+∑i,j=1i≠jr∑ui=1Ii-1∑uj=1Ij-1∑z1=1Ir+1⋯∑zs=1ImZ0⋯0ui0⋯0uj0⋯0z1⋯zs2+⋯+∑u1=1I1-1⋯∑ur=1Ir-1∑z1=1Ir+1⋯∑zs=1ImZu1⋯urz1⋯zs2.
If s=1, the first term corresponds to a noninformative one-way table and contributes zero to the sum. The following term corresponds to all (s+1)-way singly ordered tables obtained by summing over r-1 ordered marginals and may reasonably be denoted by ∑i=1rXUiZ1⋯Zs2. The following term corresponds to all (s+2)-way doubly ordered tables obtained by summing over r-2 ordered marginals and may reasonably be denoted by(5.4)∑i,j=1i≠jrXUiUjZ1⋯Zs2.
The subsequent terms involve components with successively more ordered marginals and correspond to tables that are of increasing size. The final term corresponds to a genuine m-way r-fold ordered table and may reasonably be denoted by XU1⋯UrZ1⋯Zs2. Thus,(5.5)XP2=∑i=1rXUiZ1⋯Zs2+∑i,j=1i≠jrXUiUjZ1⋯Zs2+⋯+XU1⋯UrZ1⋯Zs2.The smooth model envisaged here is product multinomial where for each(z1,…,zs), the observations follow a multinomial distribution with total counts n∙⋯∙z1⋯zs and cell probabilities {pw1⋯wrz1⋯zs} given by(5.6)pw1⋯wrz1⋯zs=pw1∙⋯∙×⋯×p∙⋯∙wr∙⋯∙{∑u1=0I1-1⋯∑ur=0Ir-1θu1⋯urz1⋯zsau1(w1)⋯aur(wr)}.An extension of the approach in [4, Section  4.4] investigates testing if the θu1⋯urz1⋯zsare collectively zero against the negation of this. Generalising the work in [4, Section  4.4], the efficient score statistic is Zw1⋯wrz1⋯zs. The information matrix is block diagonal but each block is singular. Nevertheless, the efficient score is asymptotically normal and appropriate orthogonal contrasts are asymptotically mutually independent and standard normal.The degrees of freedom may be deduced either by countingθu1⋯urz1⋯zs (or the corresponding components), or by the arguments in [2]. Consider a genuine m-way table with the first r categories ordered and the remaining s=m-r categories not ordered. This includes tables corresponding to XUiUjZ1⋯Zs2 say, resulting from summing out several of the ordered variables. This is now a doubly ordered (s+2)-way table. The degrees of freedom for XU1⋯UrZ1⋯Zs2 are (I1-1)(I2-1)⋯(Ir-1)(Ir+1×Ir+2×⋯×Im-1). There are Ir+1×Ir+2×⋯×Im multinomials (corresponding to Z1=z1,…,Zs=zs) each with (I1-1)(I2-1)⋯(Ir-1) degrees of freedom. However, one of these multinomials is determined by the marginals and the other multinomial models.We decline to write out the contrasts corresponding to the asymptotically mutually independent standard normal variables that are linear combinations of theZw1⋯wrz1⋯zs. The approach is similar to that employed in Section 3.



---

*Source: 980706-2009-11-11.xml*