You are on page 1of 7

Notes on Tukeys 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. Its just like tting a straight line to precisely 2 data points.) Thus you cant t an interaction term and so you cant 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] didnt 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 cant test for interaction. Its only a partial solution because it only tests for a particular form of interaction, but its 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 Tukeys 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 its a bit kludgy in Minitab, but for simple problems at least its not too hard. The steps are as follows:

1. 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, i.e. set zij = i + j 2. Fit the model Yij = + i + j + zij + Eij It is important to remember that z is a covariate. The test for the signicance of z forms the test for interaction. 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). The rest of the procedure is straightforward. Examples follow. Example 1: (Reproduces example 1.6.3, page 10 in [3].) An experiment was conducted to investigate the eect of temperature and humidity on the growth rate of sorghum plants. Ten plants of the same species are grown in each of 20 growth chambers; ve temperature levels and 4 humidity levels are used. The 20 temperaturehumidity combinations are randomly assigned to the 20 chambers. The heights of the plants were measured after four weeks. The experimental unit was taken to be growth chamber so the response was taken to be the average height (in cm.) of the plants in each chamber.
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.3 19.6 25.7 30.4 13.7 16.9 27.0 31.5 17.8 20.0 26.3 35.9 12.1 17.4 36.9 43.4 6.9 18.8 35.0 53.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

MTB > anova ht = hum tmpr; SUBC> means hum tmpr. 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.560 18.540 30.180 38.840 ht 22.000 22.275 25.000 27.450 28.425 Type fixed fixed DF 3 4 12 19 Levels 4 5 Values 20, 40, 60, 80 50, 60, 70, 80, 90 F 20.72 1.02 P 0.000 0.434

SS 2074.30 136.62 400.45 2611.36

MS 691.43 34.15 33.37

# Heres the kludgy bit. Sigh. set c4 5(12.56 18.54 30.18 38.84) end name c4 ahat set c5 (22 22.275 25 27.45 28.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. To get estimates of alpha_i # and beta_j we need to subtract the estimate of mu, whence # the -mean(c1) business in the expression for c6. name c6 z glm ht = hum tmpr z; cova z. Type fixed fixed Levels 4 5 Values 20, 40, 60, 80 50, 60, 70, 80, 90

Factor hum tmpr

Analysis of Variance for ht, using Adjusted SS for Tests Source hum tmpr z Error Total DF 3 4 1 11 19 Seq SS 2074.30 136.62 288.65 111.79 2611.36 Adj SS 2074.30 136.62 288.65 111.79 Adj MS 691.43 34.15 288.65 10.16 F 68.03 3.36 28.40 P 0.000 0.050 0.000

Term Constant z

Coef 25.0300 0.14273

SE Coef 0.7129 0.02678

T 35.11 5.33

P 0.000 0.000

From the above we see that the estimate of is = 0.1427 (to 4 decimal places). The F statistic for the signicance of z is 28.40; 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 Tukeys help. Note that if we are careful, we can actually do the problem without correcting for the overall mean when forming z. This goes as follows:
MTB > MTB > SUBC> SUBC> let c6 = c4*c5 GLM ht = hum + tmpr + z; cova z; ssqu 1. Type fixed fixed DF 3 4 1 11 19 Levels 4 5 # No mean correction.

# This says use sequential SS.

Factor hum tmpr Source hum tmpr z Error Total

Values 20, 40, 60, 80 50, 60, 70, 80, 90 Seq MS 691.43 34.15 288.65 10.16 F 68.03 3.36 28.40 P 0.000 0.050 0.000

Seq SS 2074.30 136.62 288.65 111.79 2611.36

Adj SS 148.06 128.41 288.65 111.79

Term Constant z

Coef -64.39 0.14273

SE Coef 16.79 0.02678

T -3.83 5.33

P 0.003 0.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 dierent.) Where we had to be careful in the foregoing was in telling Minitab to use sequential sums of squares, rather than the (default) adjusted sums of squares. If we had left in the default and not mean corrected the answer wouldve been wrong.

The same result can be achieved by regressing y on z with no constant term in the model. I.e. by tting the model Yij = zij + Eij .
MTB > regr c1 1 c6; SUBC> noco. The regression equation is ht = 0.143 z Predictor Noconstant z Coef 0.1427 SE Coef 0.2349 T 0.61 P 0.551

Analysis of Variance Source Regression Residual Error Total DF 1 19 20 SS 288.7 14852.7 15141.4 MS 288.7 781.7 F 0.37 P 0.551

Note that we get the same estimate of namely 0.1427. To do the test for the signicance of z requires more work however. We need to form F = SSRreg /1 287.5 = = 28.0 (SSEadd SSRreg )/((a 1)(b 1) 1) (400.45 287.5)/11

(compare with 28.4 from the GLM method). Under the null hypothesis of no interaction this has an F distribution on 1 and 11 degrees of freedom, so the observed value of 28 yields a p-value of 0.000. Example 2: (Taken from [4, problem 22, Chapter 10, page 441] Three dierent washing machines were used to test four dierent detergents. The response was a coded score of the eectiveness of each washing.
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.2 mach.3 mach.1 mach.2 mach.3 mach.1 mach.2 mach.3 mach.1 mach.2 mach.3 dete dete.1 dete.1 dete.1 dete.2 dete.2 dete.2 dete.3 dete.3 dete.3 dete.4 dete.4 dete.4

MTB > anova effect mach dete; MTB > anova effect = mach dete; SUBC> means mach dete. Factor mach dete Source mach dete Error Total Means mach mach.1 mach.2 mach.3 dete dete.1 dete.2 dete.3 dete.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.250 51.750 59.500 effect 54.000 56.000 58.667 50.667 Type fixed fixed DF 2 3 6 11 Levels 3 4 Values mach.1, mach.2, mach.3 dete.1, dete.2, dete.3, dete.4 F 18.29 9.23 P 0.003 0.011

SS 135.167 102.333 22.167 259.667

MS 67.583 34.111 3.694

set c4 4(53.25 51.75 59.5) end name c4 ahat set c5 (54 56 58.667 50.667)3 end name c5 bhat let c6 = c4*c5 name c6 z glm effect = mach dete z; cova z; ssqu 1. Type fixed fixed Levels 3 4 Values mach.1, mach.2, mach.3 dete.1, dete.2, dete.3, dete.4

Factor mach dete

. . . . . . (continued over page)

Analysis of Variance for effect, using Sequential SS for Tests Source mach dete z Error Total DF 2 3 1 5 11 Seq SS 135.167 102.333 11.479 10.688 259.667 Adj SS 16.012 15.998 11.479 10.688 Seq MS 67.583 34.111 11.479 2.138 F 31.62 15.96 5.37 P 0.001 0.005 0.068

Term Constant z

Coef 354.9 -0.09979

SE Coef 129.5 0.04306

T 2.74 -2.32

P 0.041 0.068

Note that the foregoing example was done without mean correcting but rather by using sequential sums of squares. In this example we get a hint of interaction (p-value = 0.068) but the term is not signicant at the 0.05 level, only at the slack 0.10 level. Note that we cant actually say that there is a lack of evidence of interaction. Only that there is a lack of evidence of this sort the Tukey sort of interaction. There could be other sorts of interaction which we cannot detect by this method lurking in the weeds.

References
[1] F. A. Graybill. An Introduction to Linear Statistical Models, Volume 1. McGraw-Hill, New York, 1961. [2] F. A. Graybill. Theory and Application of the Linear Model. Duxbury, North Scituate, Mass., 1976. [3] George A. Milliken and Dallas E. Johnson. Analysis of Messy Data Volume 2 Nonreplicated Experiments. van Nostrand Reinhold, New York, 1989. [4] Sheldon Ross. Introduction to Probability and Statistics for Engineers and Scientists. Harcourt Academic Press, San Diego, second edition, 2000. [5] Henry Sche. The Analysis of Variance. John Wiley, New York, 1959. e [6] John W. Tukey. One degree of freedom for non-additivity. Biometrics, 5:232242, 1949. [7] G. C. Ward and I. D. Dick. Non-additivity in randomized block designs and balanced incomplete block designs. New Zealand Journal of Science and Technology, 33:430435, 1952.

You might also like