You are on page 1of 7

# Notes on Tukey’s One Degree of Freedom Test for Interaction

Suppose you have a 2-way analysis of variance problem with a single observation per cell. Let the factors be “A” and “B” (corresponding to rows and columns of your table of cells, respectively), and let A have a levels and B have b levels. (I.e. your table has a rows and b columns.) Let Yij be the (single) observation corresponding to cell (i, j) (i.e. row i and column j). The most elaborate model that you can ﬁt is (in over parameterized form): Yij = µ + αi + βj + Eij That is, you cannot ﬁt the “full” model which includes an interaction term — you run out of degrees of freedom. The full model, which “would be” Yij = µ + αi + βj + (αβ)ij + Eij would use up 1 + (a − 1) + (b − 1) + (a − 1)(b − 1) = 1 + a − 1 + b − 1 + ab − a − b + 1 = ab degrees of freedom. Of course your sample size is n = ab so this leaves 0 degrees of freedom for error. (In some sense you can ﬁt the model, but it “ﬁts exactly”; your estimate of σ 2 is 0. It’s just like “ﬁtting” a straight line to precisely 2 data points.) Thus you can’t ﬁt an interaction term and so you can’t test for interaction. Fitting the (additive) model to such a data set involves tacitly assuming that there is no interaction. Such an assumption may be rash. Clever old John Tukey [6] didn’t like this situation much and (being Tukey) he was able to ﬁgure out a way to get around the dilemma, at least partially. That is, Tukey ﬁgured out a way to test for interaction when you can’t test for interaction. It’s only a partial solution because it only tests for a particular form of interaction, but it’s a lot better than nothing. Tukey described his procedure as using one degree of freedom for non-additivity. The clearest way to describe the model proposed by Tukey is to formulate it as Yij = µ + αi + βj + λ × αi × βj + Eij (1)

where the αi and the βj have their usual meaning and λ is one more parameter to be estimated (hence using up that 1 degree of freedom). This was not (according to [3, page 7]) the way the Tukey originally formulated his proposed solution to the “testing for interaction problem”. Other authors ([7, 5, 1, 2]) showed that Tukey’s procedure is equivalent to ﬁtting model (1). Now model (1) is a non-linear model due to those products of parameters λ × α i × βj which appear. So you might think that ﬁtting it would require some extra heavy-duty software. Wrong-oh! Despite the non-linearity, the model can be ﬁtted using linear model ﬁtting software, e.g. the GLM procedure in Minitab. The ﬁtting must be done in two steps, and it’s a bit kludgy in Minitab, but for simple problems at least it’s not too hard. The steps are as follows:

7 30. Examples follow.3 19.4 6.) An experiment was conducted to investigate the eﬀect of temperature and humidity on the growth rate of sorghum plants.9 12.8 20. Example 1: (Reproduces example 1.5 17.1.) of the plants in each chamber.8 35.3 35. The test for the “signiﬁcance” of z forms the test for interaction.9 18.0 31. ﬁve temperature levels and 4 humidity levels are used. Fit the model Yij = µ + αi + βj + λ × zij + Eij It is important to remember that “z” is a covariate. page 10 in [3]. The 20 temperaturehumidity combinations are randomly assigned to the 20 chambers. Fit the additive model Yij = µ + αi + βj + Eij Then use the estimates of αi and βj to form a new variable equal to the product of these estimates.9 43.4 36.6 25.0 53. The heights of the plants were measured after four weeks.6. set ˆ zij = αi + βj ˆ 2.3. The rest of the procedure is straightforward. Ten plants of the same species are grown in each of 20 growth chambers.7 16. The kludgy bit in Minitab arises in the process of constructing the z ij (and making sure they get put into their column in the right order).4 13. The experimental unit was taken to be “growth chamber” so the response was taken to be the average height (in cm. i.0 26.e. MTB > print c1-c3 Row 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ht 12.9 27.0 hum 20 40 60 80 20 40 60 80 20 40 60 80 20 40 60 80 20 40 60 80 tmpr 50 50 50 50 60 60 60 60 70 70 70 70 80 80 80 80 90 90 90 90 2 .1 17.

90 Factor hum tmpr 3 .54 30.425)4 end name c5 ’bhat’ let c6 = (c4-mean(c1))*(c5-mean(c1)) # Note that the numbers we set into c4 and c5 were the estimated # row and column *means* which are estimates of mu + alpha_i # and mu + beta_j respectively.540 30. 80.36 MS 691. 80 50.37 # Here’s the kludgy bit.84) end name c4 ’ahat’ set c5 (22 22.72 1. SUBC> means hum tmpr. 40. name c6 ’z’ glm ’ht’ = hum tmpr z. 60.30 136. 60.62 400. 90 F 20.275 25.000 22. 60.43 34.560 18. 70.000 0.434 SS 2074.15 33.425 Type fixed fixed DF 3 4 12 19 Levels 4 5 Values 20.180 38.18 38.45 2611. 60.450 28.45 28.MTB > anova ’ht’ = hum tmpr.56 18. cova ’z’.840 ht 22. 40. To get estimates of alpha_i # and beta_j we need to subtract the estimate of mu. Sigh. Type fixed fixed Levels 4 5 Values 20. 80. whence # the ‘‘-mean(c1)’’ business in the expression for c6.02 P 0. 70.000 27. 80 50.275 25 27. set c4 5(12. Factor hum tmpr Source hum tmpr Error Total Means hum 20 40 60 80 tmpr 50 60 70 80 90 MTB > MTB > DATA> DATA> MTB > MTB > DATA> DATA> MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > MTB > SUBC> N 5 5 5 5 N 4 4 4 4 4 ht 12.

65 111.30 136.83 5.03 3.06 128. Type fixed fixed DF 3 4 1 11 19 Levels 4 5 # No mean correction.) Where we had to be careful in the foregoing was in telling Minitab to use sequential sums of squares.11 5.15 288.43 34.03 3.33 P 0.02678 T 35. # This says ‘‘use sequential SS’’.65 10.79 Adj MS 691.Analysis of Variance for ht. cova ’z’.14273 SE Coef 0.33 P 0.65 111.7129 0. ssqu 1.40. 60.62 288.000 0.40 P 0.000 0.30 136. 70.79 Term Constant z Coef -64. The F statistic for the “signiﬁcance” of z is 28. 90 Seq MS 691.41 288.79 0.36 28. If we had left in the default and not “mean corrected” the answer would’ve been wrong.16 F 68.62 288.36 Adj SS 148.02678 T -3.000 The results are the same as before — at least those in which we are interested are the same! (The “Constant” term estimate is quite diﬀerent.40 P 0. Note that if we are careful.79 2611.000 Term Constant z Coef 25.65 10.36 28.0300 0. 4 . Factor hum tmpr Source hum tmpr z Error Total Values 20.36 Adj SS 2074. it has a p-value of 0 (to 3 decimal places) whence we can conclude with virtual certainty that there is interaction between humidity and temperature — something we could not have checked upon without Tukey’s help.30 136. 40. we can actually do the problem without correcting for the “overall mean” when forming z.15 288.000 Seq SS 2074.050 0. 60.43 34.1427 (to 4 decimal places).65 111. 80.050 0. using Adjusted SS for Tests Source hum tmpr z Error Total DF 3 4 1 11 19 Seq SS 2074.62 288.000 0. This goes as follows: MTB > MTB > SUBC> SUBC> let c6 = c4*c5 GLM ’ht’ = hum + tmpr + z.003 0. 80 50. rather than the (default) “adjusted” sums of squares.14273 SE Coef 16.39 0.65 111.79 2611.000 ˆ From the above we see that the estimate of λ is λ = 0.16 F 68.

5 = = 28.3 mach.5)/11 (compare with 28.2 dete.4 dete.1 dete.7 15141.3 dete.2 dete.45 − 287. so the observed value of 28 yields a p-value of 0.4 5 .551 Analysis of Variance Source Regression Residual Error Total DF 1 19 20 SS 288. by ﬁtting the model Yij = λzij + Eij . Chapter 10.1427 SE Coef 0.e.2 mach.3 dete dete.3 mach. SUBC> noco.7 F 0.2349 T 0.000.2 mach. I.143 z Predictor Noconstant z Coef 0.61 P 0.37 P 0.0 (SSEadd − SSRreg )/((a − 1)(b − 1) − 1) (400.3 dete.3 mach.The same result can be achieved by regressing y on z with no constant term in the model.4 MS 288.1 mach.2 dete. MTB > regr c1 1 c6.1 mach.551 Note that we get the same estimate of λ namely 0. Example 2: (Taken from [4. MTB > print c1-c3 Row 1 2 3 4 5 6 7 8 9 10 11 12 effect 53 50 59 54 54 60 56 58 62 50 45 57 mach mach.1 mach.3 dete. Under the null hypothesis of no interaction this has an F distribution on 1 and 11 degrees of freedom.7 781.4 from the GLM method). We need to form F = SSRreg /1 287.1427. The response was a coded score of the eﬀectiveness of each washing.4 dete. problem 22.2 mach.1 dete.7 14852.1 dete.1 mach. The regression equation is ht = 0. To do the test for the signiﬁcance of z requires more work however.2 mach. page 441] Three diﬀerent washing machines were used to test four diﬀerent detergents.

003 0. mach.3 dete dete.1.2.667)3 end name c5 ’bhat’ let c6 = c4*c5 name c6 ’z’ glm ’effect’ = mach dete z. mach. dete.111 3.2 dete.2 mach.250 51. dete.23 P 0. dete. cova ’z’.2.694 set c4 4(53.3 dete.2.667 50.4 Factor mach dete .3 dete. mach. (continued over page) 6 .667 Type fixed fixed DF 2 3 6 11 Levels 3 4 Values mach.167 259. .667 50.4 F 18. SUBC> means mach dete.2. .011 SS 135. . ssqu 1.583 34. MTB > anova ’effect’ = mach dete.25 51. .3.1.500 effect 54.4 MTB > DATA> DATA> MTB > MTB > DATA> DATA> MTB > MTB > MTB > MTB > SUBC> SUBC> N 4 4 4 N 3 3 3 3 effect 53.3 dete.5) end name c4 ’ahat’ set c5 (54 56 58.75 59. mach.1.1.000 56.000 58.1 mach.1 dete.3. dete. . Factor mach dete Source mach dete Error Total Means mach mach. dete. dete.750 59.667 MS 67.MTB > anova ’effect’ mach dete.29 9.167 102. Type fixed fixed Levels 3 4 Values mach.333 22.

In this example we get a hint of interaction (p-value = 0. Theory and Application of the Linear Model. 33:430–435. 2000. e [6] John W. [2] F. North Scituate. using Sequential SS for Tests Source mach dete z Error Total DF 2 3 1 5 11 Seq SS 135..37 P 0. Only that there is a lack of evidence of this sort — the Tukey sort — of interaction. 1949. Tukey. only at the slack 0. C. 1961. John Wiley.74 -2. 1976. New Zealand Journal of Science and Technology.068 Term Constant z Coef 354. [3] George A. Dick. Non-additivity in randomized block designs and balanced incomplete block designs.479 2. San Diego. New York.333 11.688 Seq MS 67.111 11.041 0. References [1] F.001 0.998 11. Mass. Milliken and Dallas E. Johnson. Introduction to Probability and Statistics for Engineers and Scientists.04306 T 2. [4] Sheldon Ross.96 5. Duxbury.667 Adj SS 16. second edition. 5:232–242. A.62 15.012 15. One degree of freedom for non-additivity.5 0.068) but the term is not signiﬁcant at the 0.583 34.068 Note that the foregoing example was done without “mean correcting” but rather by using “sequential sums of squares”. [5] Henry Scheﬀ´. The Analysis of Variance. 1989. Volume 1. [7] G. McGraw-Hill.Analysis of Variance for effect.167 102. 1959. Harcourt Academic Press. Ward and I. New York.32 P 0.05 level.005 0. 7 .138 F 31. Graybill.479 10. Biometrics. A. New York. Note that we can’t actually say that there is a lack of evidence of interaction. An Introduction to Linear Statistical Models. D.09979 SE Coef 129. 1952.9 -0.688 259. Graybill. There could be other sorts of interaction which we cannot detect by this method lurking in the weeds.10 level. Analysis of Messy Data Volume 2 Nonreplicated Experiments. van Nostrand Reinhold.479 10.