A Multivariate Test for Three-Factor Interaction in 3-Way Contingency Table under the Multiplicative Model

Two test statistics that have been commonly used in analysing interactions in contingency table are the Pearson’s Chi-square statistic, χ2, and likelihood ratio test statistic, G2. Both test statistics, in tables with sufficiently large sample size, have an asymptotic chi-square distribution with degrees of freedom (df) equal to the number of free parameters in the saturated model. For example under the hypothesis of independence of the row and column conditioned on the layer in an I × J × K contingency table, the df is K(I − 1)(J − 1). These test statistics, in large sized tables, will have less power since they have large degrees of freedom. This paper proposes a product effect model, which combines the advantages of the multiplicative models over the additive, for analysing the interaction between the row and column of the 3-way table conditioned on the layer. The derived statistics is shown to be asymptotically chi-square with a small degree of freedom, K − 1, for the I × J × K contingency table. The performance of the developed statistic is compared with the Pearson’s chi-square statistic and the likelihood ratio statistic test using an illustrative example. The results show that the product effect test can detect interaction even when some of the main effects are not significant and can perform better than the other competitors having smaller degree of freedom in large sized tables.


Introduction
is the joint distribution of A, B, and C. Interaction in the 3-way contingency has been tested using the chi-square statistic and the likelihood ratio test statistic with ( )( )( ) [1]- [3].Grizzle et al. [4], Darroch [5] and Johnson and Graybill [6] have modelled interaction as a product of the marginal effects or components of the ways of classification of the table.Tukey [7] in order to overcome the difficulty in testing for interaction in the two-factorial experiment with one observation per cell modelled the two-factor interaction as a product of the effects of the two factors and developed a one degree of freedom F-test for analysing the interaction between the factors.Drawing an analogy from the two factorial experiments we can view the 2-way contingency table as a two-factorial experiment with one observation per cell similar to the Poisson modelling of 2-way contingency table where the cell observations are seen as the mean number of occurrences of the event within a defined infinitesimal interval.The I × J × K contingency table can be viewed as K 2-way contingency table.The present paper argues that the transformation of the contingency table applicable in the likelihood ratio tests [1] [8] is often unnecessary but that the data can be analysed in a manner similar to the Pearson's chi-square which does not transform the data.A multivariate approach is adopted in analysing the interaction in an I × J × K table, under the product effect model, where the three-factor interaction is defined as a product of the effects of the ways of classification of the table.The advantage of the proposed model is that it gives rise to chi-square tests with smaller degrees of freedom, irrespective of the size of the table, which is conjectured to have greater power than other tests with larger degrees of freedom.It has been shown [9] [10] that the power of the noncentral chi-square statistics, for a given value of non-centrality parameter and level of significance, increases as the degree of freedom decreases.Our results will be of some practical value to researchers who are involved in analysing mutual independence in higher order tables as their results will be based on small degrees of freedom leaving extra degrees of freedom for further decomposition of other forms of independence in the data.Extension of the proposed method to higher order tables is straightforward.

Model for 3-Factor Interaction
Let us assume that we have an I × J × K 3-way contingency, representing respectively the row, column and layer classifications of the table, and that the K-dimensional vector { } n n ′ are independent for all .k k′ ≠ The 3-way contingency table under the multinomial structure described above is similar to the layout of a three-factorial experiment with one observation per cell.In the spirit of [7] and drawing an analogy from the factorial experimental structure, a linear additive model for the observed cell probability in the ( ) , , i j k -cell can be written as in (1.2).The interest is in the consideration of models where these probabilities depend on a vector i x of covariates associated with the ( )

0; 0
and are independent of the k th layer.
The relation (1.3) can be recast in vector notation as ( ) ( ) in the main diagonal in the off diagonal positions diag , , , ; , ; , The matrix n is given as , , , , For the k th layer, the interaction between the i th row and j th column is defined multiplicatively as being proportional to the i th row effect and j th column effect and given as where, c k is an unknown constant for the layer; ik τ and jk β are respectively the effect of the i th row and j th column for the k th layer.The model (1.9) is referred to as the product effect model [2] [3].The classical method of partitioning the chi-squares for the 3-way ( ) contingency table does not provide a convenient test of the null hypothesis that the 3-way interaction is zero [11].The model indicates that the three-factor interac-tion in the contingency table and for the k th layer response is proportional to the product of the effects of i th row classification and the j th column classification of the table.Darroch [12] has demonstrated the advantages of the multiplicative interaction models over the additive.( )
The matrix of interaction Λ can be written as From (1.5) or (1.6) the residual after substituting (2.1) becomes , , , The matrix of sum of squares sum of product (SS-SP) for interaction from (2.3) is ( ) ˆat the -th diagonal position ˆˆat the , th off diagonal position The total sum of squares and cross product (SS-SP) is given as where,

( )
..1 ..2 .. ˆˆdiag , , , The expectation of The total SS-SP matrix T H can be partitioned into unit SS-SP, u H , SS-SP due to the row effect, H τ , SS-SP due to the column effect, H β , and SS-SP due to the residual, z H , namely The unit SS-SP matrix u H is given by ( ) with ( ) The matrix of SS-SP for the row effect, H τ , is ( ) ˆat the -th diagonal position ˆˆˆˆat the , off diagonal position With expectation, ( ) The matrix of SS-SP, H β , due to the column effect is ( ) ˆat the -th diagonal position ˆˆˆˆa t the , off diagonal position With expectation, ( ) The matrix of SS-SP for the residual (2.3) is Since the cross-product terms will vanish on taking expectation because of independence and restriction in (1.4) ˆˆat the diagonal position ˆˆˆˆˆˆˆˆa t the , off diagonal position where, diag , , , , with The hypothesis of no interaction, 0 : 0 However, whether or not 0 : 0 H c = is true, ( ) ( ) where V is as defined in (2.10).Each of the quantities ( ) H provides an estimate of V and can be employed in the construction of tests of significance of the row, column effects and interaction provided that they are independent.

Independence of H T , H c , H τ , H β
By appealing to the following theorem [13], it can be shown that the quadratic forms H T , H c , H τ and H β , are independent.
Theorem 2.1.Let Y be distributed ( ) . The random matrix H T follows the Wishart distribution with parameter ( ) and V and independent of H c .They can be used in constructing the determinant based test statistic for the hypothesis 0 : 0 H c = Since the matrix V is nonsingular, by generating the matrix of contrasts, say B and pre-and post-multiplying each of them by B and B transpose, V can be made non-singular. Let k m′ is an IJ column vector of independent variables for the k th response.Also define ( ) where ( ) The matrix B is of full rank, ( ) is a non-singular transformation of the matrix H c and so also is the matrix However, [14] and [15] have discussed the equivalence between 0 H and * where ( ) ; ; Λ defines the Wilks distribution with parameters ( ) ; ; .It has been shown (see e.g.Kshirsagar, 1972) that ( ) where 2 i r is the square of the i th sample canonical correlation and the root of the determinantal equation ( ) and 2   r is related to λ the root of the determinantal equation by the relation Under the null hypothesis, * * : 0 c H c = and using (3.9), that is 0 It has been shown, [16], that − , using the notation in this paper.Thus, ( ) ( ) ( ) ( ) The best value of m for the expectation on both sides of (3.13) to be equal is ( ) and can provide a test criterion for the rejection or non-rejection of 0 : 0. H c = .
The test rejects the hull hypothesis if ( ) at an α -level of significance.

Illustrative Example
The application of the developed test makes use of data taken from [17] (see Table 1).The data represent the attitude of 333 undergraduate students of University of Nigeria towards taking up teaching as a profession after graduation.The students were sampled from three groups of faculties, 1 F , 2 F and 3 F .The responses Y (yes), N (no), U (undecided) indicates willing, not willing and undecided respectively.
The estimates of the parameters in (1.5) are:    The Pearson's chi-square for testing the hypothesis of no interaction (independence of the row and column for the k th response), 0 . .
gives the computed value of the test statistic as, X 2 = 8.214 based on 6 d.f while the likelihood ratio test statistic, G 2 for testing H 0 is calculated as G 2 = 7.804.Both test statistics are based on 6 degrees of freedom and show that interaction is not significant.

Conclusion
The results of the analysis show that while the effect of the sex and interaction are significant in the data, the effect of faculty is not significant.Thus, the proposed test for interaction based on the product effect model and based on 2 degrees of freedom ( )

A 3 -
way contingency table is a cross-classification of observations by the levels of three categorical variables-A, B, and C. The levels can be ordinal or nominal.If n units in a sample are independently and identically distributed (IID); that is, if they constitute a random sample, then the vector of cell counts cell of the contingency table with variables A, B and C. The probability distribution { } ijk π

.
In addition if we assume that { } ijk K n follows a multinomial probability distribution given by

7 )
Estimation of the parameters of this model (1.6) by maximum likelihood proceeds by maximization of the multinomial likelihood (1.1) with the probabilities ijk π viewed as functions of the parameters ..k µ , .
9), the model for the two-factor interaction for the k th layer response, in vector notation,

CH
and the invariant property of the Wilks Λ criterion under such transformation as above.Also the quadratic forms * T H and * C H (3.4 and 3.5) are independent Wishart distributed matrices with same degrees of freedom as T H and c H respectively and variance-covariance matrix * V BVB′ =.Hence the analogue of the Wilks criterion can be used in testing the hypotheses and is given by H τ and H β are independent.By theorem 1, the joint independence of H T , H c , H τ and H β implies pairwise independence.= , the matrix H c has a pseudo Wishart distribution with parameter 1 and

Table 1 .
These values are summarized in the Table2.Attitude of university students towards the teaching profession.

Table 2 .
Multanova of categorical data for attitude of students towards teaching.