Unit 10: Split-Plot Designs, Repeated Measures, and Expected Squares

STA 643: Advanced Experimental Design

Derek S. Young

1 Learning Objectives

I Become familiar with whole plots and subplots as they pertain to split-plot designs

I Know how to analyze a split-plot design

I Understand the different sources of experimental error in split-plot designs

I Know how to calculate standard errors for treatment factor in a split-plot design

I Become familiar with split-split-plot and split-block designs

I Understand repeated measures designs and their connection to split-plot designs

I Know how to handle ranked data in a repeated measures design I Become familiar with the steps for determining expected mean squares

2 Outline of Topics

1 Split-Plot Designs

2 Split-Split-Plot Designs

3 Split-Block Designs

4 Repeated Measures Designs

5 Handling Ranked Data

6 Expected Mean Squares

3 Outline of Topics

1 Split-Plot Designs

2 Split-Split-Plot Designs

3 Split-Block Designs

4 Repeated Measures Designs

5 Handling Ranked Data

6 Expected Mean Squares

4 Example: Agricultural We motivate our discussion by considering an agricultural investigation to study the effects of two irrigation methods (factor A) and two fertilizers (factor B) on yield of a crop. Let A1 and A2 be the two levels of factor A and B1 and B2 be the two levels of factor B. Four fields are available as the EUs. The four treatments – A1B1, A1B2, A2B1, and A2B2 – are assigned at random to the four fields in a CRD. Since there are four treatments and four EUs, there will be no df for estimation of error as shown in the abbreviated ANOVA table below. However, if the fields could be divided into smaller fields, replicates of each factor-level combination could be obtained and the error could then be estimated. In this case, the smaller fields become the MUs. Unfortunately, in this investigation, it is not possible to apply different irrigation methods (factor A) in areas smaller than a field (the EU), although different fertilizer types (factor B) could be applied in relatively small areas. Such a situation is where a split-plot design can be used.

Source of Variation df Factor A 1 Factor B 1 AB 1 Error 0 Total 3

5 Background on Split-Plot Designs

I As noted in the motivating example, one factor sometimes requires more experimental material for its evaluation than a second factor in factorial . I In agricultural studies, a factor – such as irrigation method – may only be applicable (or best-suited) for large plots, while another factor – such as fertilizers – may be applied easily to smaller plots. I The larger treatment is applied to what we call the whole plots, which is then split into smaller subplots. Designs that accommodate this allocation of treatments are called split-plot designs. I The usage of the term plots stems from split-plot designs being developed for agricultural studies; while still commonly found in agriculture, split-plot designs are also used in laboratory, industrial, and social experiments. I The primary advantage of a split-plot design is that it allows us to design an experiment when one factor requires considerably more experimental material than another factor, or accommodate the situation where there is an opportunity to study responses to a second factor while efficiently utilizing resources. I The primary disadvantage of a split-plot design is the potential loss in treatment comparisons and an increase in complexity of the statistical analysis (which we will see).

6 for Split-Plot Designs

I In split-plot designs, the usual randomization of treatment combinations to the EUs is altered to accommodate the particular requirements of the experiment.

I In the usual CRD, all treatment combinations are assigned randomly to the EUs.

I However, in the split-plot design, each level of the second factor is combined with a single level of the first factor (i.e., the factor requiring more experimental material), which has been assigned to the whole plot.

I In other words, at the first level of randomization, the whole plot treatments are randomly assigned to whole plots; at the second level, the subplot treatments are randomly assigned to the subplots.

7 Example: Agricultural Experiment As we noted in the agricultural experiment, the irrigation methods (factor A) can only be applied to one field as a whole. In the figure below, we see that the four fields have been randomly assigned to one of the two factor levels of A. Within each field (the whole plot), it is divided into two subplots. Each of these subplots is then randomly assigned to one of the two levels of factor B. Through this split-plot design, we have increased our total number of EUs N from 4 to 8.

Field&1 Field&2 Field&3 Field&4

A2 A1 A1 A2

B1 B2 B1 B2 Subplot&Factor&B

B2 B1 B2 B1

Whole&Plot& Factor&A

8 Two Experimental Errors for Split-Plot Designs

I In the analysis of split-plot designs, we must account for the presence of two different sizes of EUs used to test the effect of the whole plot treatment and subplot treatment.

I Factor A effects are estimated using the whole plots and factor B and the A × B interaction effects are estimated using the subplots.

I Since the size of whole plot and subplots are different, they have different precisions.

I Moreover, two separate errors account for the fact that observations from different subplots within each whole plot may be positively correlated, since it is natural to assume that EUs adjacent to one another are likely to respond similarly.

I For example, consider neighboring field plots, students in a classroom, or the batch of some raw material in an industrial experiment.

9 Two Experimental Errors for Split-Plot Designs

I We assume that

I there is a correlation ρ between observations on any two subplots in the same whole plot, and I observations from two different whole plots are uncorrelated. I Given the above assumptions and assuming that there are b subplots for each whole plot, then

I the error variance for the main effects of A on a per-subplot basis is σ2[1 + (b − 1)ρ], and I the error variance per subplot for the main effects of B and the interaction A × B is σ2(1 − ρ). I These different error result in a different SS partitioning for the ANOVA. I The partitions for and factor effects remain the same as for a factorial design, but the experimental error is partitioned into two components: one for the whole-plot treatment factor and one for the subplot treatment factor and interaction.

10 Split-Plot Model

I For the split-plot design, a mixed-model formulation is used with separate random error effects for the whole-plot units and subplot units. I Placing the whole-plot treatment in an RCBD, a linear model for the split-plot design is Yijk = µ + αi + ρk + dik + βj + (αβ)ij + ijk, (1)

where I µ is the overall mean (a constant); I i = 1, . . . , a, j = 1, . . . , b, and k = 1, . . . , n; Pa I αi are the (fixed) effects of factor A subject to the constraint αi = 0; Pni=1 I ρk are the (fixed) effects of block k subject to the constraint k=1 ρk = 0; I dik are the (random) effects for the whole-plot random error and are iid normal with mean 0 and 2 variance σd; Pb I βj are the (fixed) effects of factor B subject to the constraint j=1 βj = 0; I (αβ)ij are the (fixed) effects due to the interaction of A and B subject to the constraint Pa Pb i=1(αβ)ij = j=1(αβ)ij = 0; 2 I ijk is the subplot (random) error and are iid normal with mean 0 and variance σ ; and I dik and ijk are assumed independent of one another. I Note that randomization of treatments is what justifies the assumption of independence for the two random errors and the equal correlation between the errors for subplot units on the same whole-plot unit.

11 SS Decomposition

I The total deviation for the split-plot model on the previous slide is total deviation: (yijk − y¯···), which is the sum of the following components:

block deviation: (¯y··k − y¯···)

factor A deviation: (¯yi·· − y¯···)

whole-plot error: (¯yi·k − y¯i·· − y¯··k +y ¯···)

factor B deviation: (¯y·j· − y¯···)

interaction AB deviation: (¯yij· − y¯i·· − y¯·j· +y ¯···)

subplot error: (yijk − y¯ij· − y¯i·k +y ¯i··)

12 SS Decomposition

I The SS of the decomposition on the previous slide (where the sums of cross-products drop out) yields Block effect: =

Factor A effect: =

Whole-plot error: =

Factor B effect: =

Interaction AB effect: =

Subplot error: =

13 ANOVA for Split-Plot Designs

I Finally, we can obtain the following ANOVA table: Source df SS MS E(MS) Whole Plots P 2 2 2 k ρk Block (n − 1) SSBlk MSBlk σ + bσd + ab n−1 P 2 2 2 i αi A (a − 1) SSA MSA σ + bσd + nb a−1 2 2 Whole-Plot Error (a − 1)(n − 1) SSWP MSWP σ + bσd Subplots P β2 2 j j B (b − 1) SSB MSB σ + na b−1 P P (αβ)2 2 i j ij AB (a − 1)(b − 1) SSAB MSAB σ + n (a−1)(b−1) Subplot Error a(b − 1)(n − 1) SSSP MSSP σ2 Total abn − 1 SSTot I The E(MS) for the whole-plot error and the subplot error reflect the differences in the variability for the two different types of EUs – namely, the expected error variances for the whole plots are larger than those for the subplots.

14 Tests of Hypotheses About Factor Effects

I First we test for interactions with the following hypotheses:

H0 :(αβ)ij = 0 for all i, j

HA :(αβ)ij 6= 0 for some i, j, which has test F ∗ =

I Next we test for factor B main effects with the following hypotheses:

H0 : β1 = β2 = ··· = βb = 0 HA : at least one βj is different, which has test statistic

F ∗ =

I Finally we test for factor A main effects with the following hypotheses:

H0 : α1 = α2 = ··· = αa = 0

HA : at least one αi is different, which has test statistic F ∗ =

15 Computational Notes

I Split-plot ANOVA calculations are standard with most statistical computing packages.

I The instructions for the analysis are similar to those for a two-factor factorial treatment design, but for the split-plot design you need to compute two separate error terms.

I The SSWP is numerically equivalent to

I the error SS for the experimental design utilized for the whole plots; I the SS for whole plots within factor A treatments in a CRD; I The SS computation for blocks by factor interaction in a RCBD.

I The SSSP is ordinarily the residual SS computed automatically by the statistical program.

16 Example: Turfgrass Experiment Consider the general set-up we introduced for the agricultural experiment at the beginning of the lecture. A soil scientist wants to investigate the effects of nitrogen supplied in different chemical forms and evaluate those effects combined with those of thatch accumulation on the quality of turfgrass. Four forms of nitrogen fertilizer are used: (1) urea, (2) ammonium sulphate, (3) isobutylidene diurea (IBDU), and (4) sulphur-coated urea, (urea (SC)). Any differences in response to the fertilizers then could be attributed to the of nitrogen release because an equivalent amount of nitrogen was supplied by each form. A golf green was constructed and seeded with Penncross creeping bent grass on the experimental plots. The nitrogen treatment plots were arranged on the golf green in an RCBD with two replications. After two years, the second treatment factor – years of thatch accumulation – was added to the experiment. Each of the eight experimental plots was split into three subplots to which levels of the second treatment factor were randomly assigned. The lengths of time the thatch was allowed to accumulate on the subplot were 2, 5, or 8 years. Thus, the split plot design had the whole-plot treatment factor of nitrogen source (A) in an RCBD with years of thatch accumulation (B) as the subplot treatment factor. The data for this experiment are presented on the next slide.

17 Example: Turfgrass Experiment

Nitrogen Years Block Source 2 5 8 1 3.8 5.3 5.9 Urea 2 3.9 5.4 4.3 1 5.2 5.6 5.4 Ammonium Sulphate 2 6.0 6.1 6.2 1 6.0 5.6 7.8 IBDU 2 7.0 6.4 7.8 1 6.8 8.6 8.5 Urea (SC) 2 7.9 8.6 8.4

*The measurements made on the turfgrass plots (which are reported in the table above) is the chlorophyll content of clippings (mg/g).

18 Example: Turfgrass Experiment

Error: Field Df Sum Sq Mean Sq F value Pr(>F) Block 1 0.51 0.510 1.217 0.3505 Nitrogen 3 37.32 12.442 29.672 0.0099 ** Residuals 3 1.26 0.419 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1

Error: Within Df Sum Sq Mean Sq F value Pr(>F) Years 2 3.816 1.9079 8.891 0.00927 ** Nitrogen:Years 6 4.154 0.6924 3.227 0.06460 . Residuals 8 1.717 0.2146 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1

I The test for interaction between nitrogen and thatch is F ∗ = 0.692/0.215 = 3.227, which yields a a p-value of 0.065; therefore, the interaction is moderately significant at the 0.05 level. I The test for differences among thatch means is F ∗ = 1.908/0.215 = 8.891, which yields a a p-value of 0.009; therefore, the differences are significant at the 0.05 level. I The test for differences among the whole-plot nitrogen treatment means is F ∗ = 12.442/0.419 = 26.672, which yields a a p-value of 0.010; therefore, the differences are significant at the 0.05 level. I Notice in the output above how the sources of variation are partitioned based on the error source that they are tested against; i.e., Field and Within.

19 Example: Turfgrass Experiment

Nitrogen Years Nitrogen Source 2 5 8 Means Urea 3.85 5.35 5.10 4.77 Ammonium Sulphate 5.60 5.85 5.80 5.75 IBDU 6.50 6.00 7.80 6.77 Urea (SC) 7.35 8.60 8.45 8.13 Thatch Means 5.83 6.45 6.79

I The above table gives the cell means (i.e., the mean of the two blocks for the given treatment combination) and the marginal means of nitrogen and years of thatch accumulation.

I Turf that received urea (SC) had the highest chlorophyll content followed by IBDU, ammonium sulphate, and finally urea.

I This relative of chlorophyll content was the same for each year of thatch accumulation.

20 Example: Turfgrass Experiment

Factor Plot for Grass Experiment

Nitrogen Source

8 urea_SC IBDU ammsulph urea 7 6 Mean Chlorophyll Content Chlorophyll Mean 5 4

2 5 8

Years of Thatch Accumulation

I Above is a factor plot of the mean chlorophyll content versus the years of thatch accumulation, separated by nitrogen source. I The marginal means in the table on the previous slide indicate an increase in chlorophyll content as the years of thatch accumulation increase; however, there is not an increase in the cell means for each nitrogen source as the years of thatch accumulation increase.

21 Standard Errors for Treatment Factor Means

I We next present the standard errors for tests of hypotheses for comparisons among the estimated treatment means. I The df associated with each of the standard errors are the df for the MS that is used in the calculation, except for the difference between two factor A means at the same or different level of factor B.

I The df for this latter setting is obtained using the Satterthwaite approximation as follows:

[(b − 1)MSSP + MSWP]2 f3 = 2 2 , [(b−1)MSSP] + [MSWP] f2 f1

where f1 = (a − 1)(n − 1) and f2 = a(b − 1)(n − 1) are the df for MSWP and MSSP, respectively.

22 Standard Errors for Treatment Factor Means

Treatment Comparison SE Estimator df Difference between two A means q 2MSWP y¯u·· − y¯v·· nb f1 Difference between two B means q 2MSSP y¯·u· − y¯·v· na f2 Difference between two B means at same A level q 2MSSP y¯ju· − y¯jv· n f2 Difference between two A means at same or different B levels

y¯uk· − y¯vk· or q 2[(b−1)MSSP+MSWP] f3 y¯uk· − y¯vm· nb

23 Example: Turfgrass Experiment Using the standard error formulas on the previous slide, we can calculate them for the turfgrass experiment: I two nitrogen means: s s 2MSWP 2(0.419) = = 0.374 df = 3 nb 6

two thatch means: I s s 2MSSP 2(0.215) = = 0.232 df = 8 na 8 I two thatch means for the same nitrogen level: s s 2MSSP 2(0.215) = = 0.464 df = 8 n 1

I two nitrogen means at same or different thatch levels: s s 2 [(b − 1)MSSP + MSWP] 2[2(0.215) + 0.419] = = 0.532, nb 6

with df: [2(0.215) + 0.419]2 = 8.830 (or 9) [2(0.215)]2 [0.42]2 8 + 3

24 Efficiency of Split-Plot Designs

I We can also calculate the efficiency of the split-plot design relative to the RCBD for each of the subplot and whole-plot comparisons. I These efficiencies are a(b − 1)MSSP + (a − 1)MSWP RE = J sub (ab − 1)MSSP a(b − 1)MSSP + (a − 1)MSWP RE = K whole (ab − 1)MSWP respectively, where (a(b − 1)(r − 1) + 1)((ab − 1)(r − 1) + 3) J = (a(b − 1)(r − 1) + 3)((ab − 1)(r − 1) + 1) ((a − 1)(r − 1) + 1)((ab − 1)(r − 1) + 3) K = . ((a − 1)(r − 1) + 3)((ab − 1)(r − 1) + 1)

25 Replicates

I There are alternative forms of split-plot models, just like we would have with other designs. I Another common model is one where blocking is not present, but rather the blocking term is replaced by a random effect due to replicates. I On the next slide is a model for such a design, but there are a couple of notes regarding the model: I No df will be left to estimate a variance component for ijk; i.e., no additional index l is available to include in the subscript of ijk. I We break our convention of using Roman letters for random effects because the “bookkeeping” of the notation for the indices and the effects becomes quite cumbersome!

26 Split-Plot Design with Replicates

I The linear model is

Yijk = µ + γi + αj + (γα)ij + βk + (γβ)ik + (αβ)jk + (γαβ)ijk + ijk, (2)

where I µ is the overall mean (a constant) I i = 1, . . . , r, j = 1, . . . , a, and k = 1, . . . , b 2 I γi are the (random) effects due to replicates and are iid normal with mean 0 and variance σγ Pa I αj are the (fixed) effects of factor A subject to the constraint j=1 αj = 0 I (γα)ij are the (random) effects for the whole-plot random error and are iid normal with mean 0 2 and variance σγα Pb I βk are the (fixed) effects of factor B subject to the constraint k=1 βj = 0 I (γβ)ik are the (random) effects for the replicates by factor B interaction and are iid normal with 2 mean 0 and variance σγβ I (αβ)jk are the (fixed) effects due to the interaction of A and B subject to the constraint Pa Pb j=1 αj βk = k=1 αj βk = 0 I (γαβ)ijk are the (random) effects due to the subplot error and are iid normal with mean 0 and 2 variance σγαβ 2 I ijk is the (random) error term and are iid normal with mean 0 and variance σ I γi, (γα)ij , (γβ)ik, (γαβ)ijk, and ijk are all assumed independent of one another

27 Expected Mean Squares

I The E(MS) for the model in (2) are as follows:

Model Term E(MS) Whole Plots 2 2 γi σ + abσγ P 2 2 2 rb j αj αj σ + abσγα + a−1 2 2 (γα)ij σ + abσγα Subplots P 2 2 2 ra k βk βk σ + aσγβ + b−1 2 2 (γβ)ik σ + aσγβ P P 2 2 2 r j k(αβ)jk (αβ)jk σ + σγαβ + (a−1)(b−1) 2 2 (γαβ)ijk σ + σγαβ 2 ijkl σ (not estimable)

28 Outline of Topics

1 Split-Plot Designs

2 Split-Split-Plot Designs

3 Split-Block Designs

4 Repeated Measures Designs

5 Handling Ranked Data

6 Expected Mean Squares

29 Split-Split-Plot Designs

I The restriction on randomization mentioned in the split-plot design can be extended to more than one factor.

I The convenience of introducing a third factor into the treatment designs requires a subdivision of the subplots such that all levels of the third factor are administered to these new subdivisions, called sub-subplots.

I The design is called a split-split-plot design and has three different sizes (or types) of EUs.

I The ANOVA follows the same logic as that for the split-plot design, but now we have a third factor (C) at c levels, which results in additional sources of variation (and hence different layers) in the ANOVA table.

30 Split-Split-Plot Design Model

I Placing the whole-plot treatment in an RCBD, a linear model for the split-split-plot design is

Yijkl = µ + αi + ρl + dil + βj + (αβ)ij + fijl (3) + γk + (αγ)ik + (βγ)jk + (αβγ)ijk + ijkl

where I µ is the overall mean (a constant); I i = 1, . . . , a, j = 1, . . . , b, k = 1, . . . , c, and l = 1, . . . , n; I αi, βj , and γk are the (fixed) effects of factors A, B, and C, respectively, while ρl are the (fixed) effects of block l, all of which are subject to the constraint that they some to 0 over their respective indices; I (αβ)ij , (αγ)ik, (βγ)jk, and (αβγ)ijk are the interaction terms subject to the usual constraints; I dil are the (random) effects for the whole-plot random error and are iid normal with mean 0 and 2 variance σd; I fijl are the (random) effects for the subplot random error and are iid normal with mean 0 and 2 variance σf ; 2 I ijkl is the sub-subplot (random) error and are iid normal with mean 0 and variance σ ; and I dil, fijl, and ijkl are assumed independent of one another. I Since the SS calculations are quite lengthy, we merely present an abbreviated ANOVA table on the following slide.

31 ANOVA for Split-Split-Plot Designs

Source df SS MS Whole Plots Block (n − 1) SSBlk MSBlk A (a − 1) SSA MSA Whole-Plot Error (a − 1)(n − 1) SSWP MSWP Subplots B (b − 1) SSB MSB AB (a − 1)(b − 1) SSAB MSAB Subplot Error a(b − 1)(n − 1) SSSP MSSP Sub-subplots C (b − 1) SSC MSC AC (a − 1)(c − 1) SSAC MSAC BC (b − 1)(c − 1) SSBC MSBC ABC (a − 1)(b − 1)(c − 1) SSABC MSABC Sub-subplot Error ab(c − 1)(n − 1) SSSSP MSSSP Total abcn − 1 SSTot

32 Example: Antibiotic Absorption Time We do not perform a full data analysis of a split-split-plot designed experiment, but simply discuss an example where one has been used. A researcher is interested in studying the effect of technicians (A), dosage strength (B), and capsule wall thickness (C) on absorption time of a particular type of antibiotic. Three technicians, three dosage strengths, and four capsule wall thicknesses results in N = 36 observations per replicate needed, but the experimenter wants to perform four replicates on different days. To do so, first, technicians are randomly assigned to units of antibiotics, which are the whole plots. Next, the three dosage strengths are randomly assigned to split-plots. Finally, for each dosage strength, the capsules are created with different wall thicknesses, which is the split-split factor and then tested in random order. Notice the restrictions that exist on randomization. We cannot simply randomize the 36 runs in a single block (or replicate), because technician is a hard-to-change factor. Next, after selecting a level for this hard-to-change factor (say technician 2 is selected) we cannot randomize the 12 runs under this technician because dosage strength is a hard-to-change factor. After we select a random level for this second factor, say dosage strength of level 3, we can then randomize the four runs under these combinations of two factors and randomly run the experiments for different wall thicknesses (third factor).

33 Example: Antibiotic Absorption Time Step 1: Lay out the EUs (antibiotic units)

Unit%1 Unit%2 Unit%3

34 Example: Antibiotic Absorption Time Step 2: Randomly assign whole plot factor A (technicians)

Unit%1 Unit%2 Unit%3

Technician%3 Technician%1 Technician%2

Whole%Plot%Factor%A

35 Example: Antibiotic Absorption Time Step 3: Randomly assign subplot factor B (dosage)

Unit%1 Unit%2 Unit%3

Technician%3 Technician%1 Technician%2

Dose%2 Dose%3 Dose%1

Dose%3 Dose%1 Dose%2 Subplot%Factor%B

Dose%1 Dose%2 Dose%3

36 Example: Antibiotic Absorption Time Step 4: Randomly assign sub-subplot factor C (thickness)

Unit*1 Unit*2 Unit*3

Technician*3 Technician*1 Technician*2

Dose%2,% Dose%2,% Dose%2,% Dose%2,% Dose%3,% Dose%3,% Dose%3,% Dose%3,% Dose%1,% Dose%1,% Dose%1,% Dose%1,% Thickness%4 Thickness%3 Thickness%1 Thickness%2 Thickness%2 Thickness%4 Thickness%3 Thickness%1 Thickness%4 Thickness%3 Thickness%2 Thickness%1

Dose%3,% Dose%3,% Dose%3,% Dose%3,% Dose%1,% Dose%1,% Dose%1,% Dose%1,% Dose%2,% Dose%2,% Dose%2,% Dose%2,% Thickness%3 Thickness%1 Thickness%2 Thickness%4 Thickness%3 Thickness%2 Thickness%4 Thickness%1 Thickness%4 Thickness%3 Thickness%1 Thickness%2

Dose%1,% Dose%1,% Dose%1,% Dose%1,% Dose%2,% Dose%2,% Dose%2,% Dose%2,% Dose%3,% Dose%3,% Dose%3,% Dose%3,% Thickness%2 Thickness%4 Thickness%3 Thickness%1 Thickness%4 Thickness%3 Thickness%1 Thickness%2 Thickness%3 Thickness%1 Thickness%2 Thickness%4 Sub$subplot*Factor*C

37 Remarks on Split-Split-Plot Designs

I Note that all of the standard errors applied to the A and B effects in the split-plot design are valid in the split-split-plot design, and need only to have the value of c included in the divisor.

I For example, the standard error of the difference between two p factor A means, y¯u··· − y¯v···, is 2MSWP/nbc. I Those comparisons involving factor C effects are given on the next slide.

38 Treatment Comparisons Involving Factor C

Treatment Comparison SE Estimator Difference between two C means q 2MSSSP y¯··u· − y¯··v· nab Difference between two C means at same A level q 2MSSSP y¯i·u· − y¯i·v· nb Difference between two C means at same B level q 2MSSSP y¯·iu· − y¯·iv· na Difference between two C means at same A and B levels q 2MSSSP y¯iju· − y¯ijv· n Difference between two B means at same or different C levels y¯·ui· − y¯·vi· or q 2[(c−1)MSSSP+MSSP] y¯·ui· − y¯·vj· nbc Difference between two B means at same A and C levels q 2[(c−1)MSSSP+MSSP] y¯iuj· − y¯ivj· or nc Difference between two A means at same or different C levels y¯u·i· − y¯v·i· or q 2[(c−1)MSSSP+MSWP] y¯u·i· − y¯v·j· nbc Difference between two A means at same or different B and C levels e.g., y¯uij· − y¯vij· or q 2[b(c−1)MSSSP+(b−1)MSSP+MSWP ] y¯uij· − y¯vlk· nbc

39 Replicates

I There are alternative forms of split-split-plot models, just like we showed with the split-plot design.

I We can, again, replace the blocking term by a random effect due to replicates. I On the next slide is a linear model for such a design, followed by a table of the expected mean squares.

I Note that, again, no df will be left to estimate a variance component for ijkh; i.e., no additional index l is available to include in the subscript of ijkh.

40 Split-Split-Plot Design with Replicates

I The linear model is

Yijkh = µ + τi + βj + (τβ)ij + γk + (τγ)ik + (βγ)jk + (τβγ)ijk

+ δh + (τδ)ih + (βδ)jh + (τβδ)ijh + (γδ)kh + (τγδ)ikh (4)

+ (βγδ)jkh + (τβγδ)ijkh + ijkh, where I µ is the overall mean (a constant) I i = 1, . . . , r, j = 1, . . . , a, k = 1, . . . , b, and l = 1, . . . , c I βj , γk, and δh are the (fixed) effects of factors A (whole plot), B (subplot), and C (sub-subplot) I (βγ)jk, (βδ)jh, (γδ)kh, and (βγδ)jkh are the (fixed) interaction terms, subject to the usual constraints I τi are the (random) effects due to replicates and are iid normal with mean 0 and variance σ2 I (τβ)ij , (τγ)ik, (τβγ)ijk, (τδ)ih, (τβδ)ijh, (τγδ)ikh, and (τβγδ)ijkh 2 2 are all iid normal with mean 0 and variances, respectively, στβ , στγ , 2 2 2 2 2 στβγ , στδ, στβδ, στγδ, and στβγδ I ijkh is the (random) error term and are iid normal with mean 0 and variance σ2 I All random error terms all assumed independent of one another

41 Expected Mean Squares

Model Term E(MS) Whole Plots 2 2 τi σ + abcστ rbc P β2 2 2 j j βj σ + bcστβ + (a−1) 2 2 (τβ)ij σ + bcστβ Subplots P 2 2 2 rac k γk γk σ + acστγ + (b−1) 2 2 (τγ)ik σ + acστγ rc P P (βγ)2 2 2 j h jh (βγ)jk σ + cστβγ + (a−1)(b−1) 2 2 (τβγ)ijk σ + cστβγ Sub-subplots P 2 2 2 rab k δk δh σ + abστδ + (c−1) 2 2 (τδ)ih σ + abστδ rb P P (βδ)2 2 2 j h jh (βδ)jh σ + bστβδ + (a−1)(c−1) 2 2 (τβδ)ijh σ + bστβδ P P 2 2 2 ra k h(γδ)kh (γδ)kh σ + aστγδ + (b−1)(c−1) 2 2 (τγδ)ikh σ + aστγδ r P P P (βγδ)2 2 2 i j k ijk (βγδ)jkh σ + aστβγδ + (a−1)(b−1)(c−1) 2 2 (τβδγ)ijkh σ + aστβγδ 2 l(ijkh) σ (not estimable)

42 Outline of Topics

1 Split-Plot Designs

2 Split-Split-Plot Designs

3 Split-Block Designs

4 Repeated Measures Designs

5 Handling Ranked Data

6 Expected Mean Squares

43 Split-Blocks

I The split-block design (also called strip-plot design or strip-split-plot design) is used when the subunit treatments occur in a strip across the whole-plot units.

I The notion of “strips” are really just another set of whole plots. I The split-block design can be useful in agricultural field studies when two treatment factors require the use of large field plots.

I The levels of one treatment factor A are randomly assigned to the plots in an RCBD. I The plots for the second factor B are constructed in the same manner, but are laid out perpendicular to the plots for factor A. I The levels of the second factor B are then randomly assigned to this second array of plots across the same block.

I A schematic showing this design is given on the following slide.

44 Split-Block Design Schematic

A3 A1 A2

B B B B 1 Strip4Plot(Factor(B 1 1 1

B2 B2 B2 B2

B3 B3 B3 B3

Subplot(Interaction(AB Whole(Plot( Factor(A

A3 A1 A2 A3B1 A1B1 A2B1

A3 A1 A2 A3B2 A1B2 A2B2

A3 A1 A2 A3B3 A1B3 A2B3

45 Split-Block Design

I We can begin by placing this design into an RCBD and construct the linear model as follows:

Yijkl = µ + ρk + αi + dik + βj + gjk + (αβ)ij + ijk (5) where I µ is the overall mean (a constant) I i = 1, . . . , a, j = 1, . . . , b, and k = 1, . . . , n I αi, and βj are the (fixed) effects of factors A (whole plot) and B (strip plot), respectively, while ρk are the (fixed) effects of block k, all of which are subject to the constraint that they some to 0 over their respective indices I (αβ)ij are the interaction terms subject to the usual constraints I dik are the (random) effects for the whole-plot random error and are iid 2 normal with mean 0 and variance σd I gjk are the (random) effects for the strip-plot random error and are iid 2 normal with mean 0 and variance σg I ijk is the subplot (random) error and are iid normal with mean 0 and variance σ2 I dik, gjk, and ijk are assumed independent of one another

46 Abbreviated ANOVA for Split-Block Designs Source df SS MS Whole Plots Block (n − 1) SSBlk MSBlk A (a − 1) SSA MSA Whole-Plot Error (a − 1)(n − 1) SSWP MSWP Strip Plots B (b − 1) SSB MSB Strip-plot Error (b − 1)(n − 1) SSStP MSStP Subplots AB (a − 1)(b − 1) SSAB MSAB Subplot Error (a − 1)(b − 1)(n − 1) SSSP MSSP Total abn − 1 SSTot

47 Outline of Topics

1 Split-Plot Designs

2 Split-Split-Plot Designs

3 Split-Block Designs

4 Repeated Measures Designs

5 Handling Ranked Data

6 Expected Mean Squares

48 Overview of Repeated Measures Designs

I Repeated measures designs are used when it is desired to take repeated measurements of the response variable on each EU. I Repeated measures designs utilize the same subject (e.g., person, store, plant, animal, etc.) for each of the treatments in the study.

I Therefore, the subject serves as a block and the EU within a block may be viewed as the different occasions when a treatment is applied to the subject. I A repeated measures study may involve several treatments or a single treatment that is evaluated at different points in time. I Repeated measures on each EU provide information on the time trend of the response variable under different treatment conditions.

I Time trends can reveal how quickly units respond to different treatment conditions or simply how they are manifested over the course of the design. I Note that the study units (e.g., person, store, plant, animal, etc.) are often referred to as subjects in repeated measures designs.

49 Examples of Repeated Measures Designs

1 15 test markets are to be used to study each of two different advertising campaigns. In each test market, the order of the two campaigns will be randomized. A sufficient time lapse between the two campaigns is allotted so that the effects of the initial campaign will not carry over into the second campaign. What are the subjects in this study?

2 200 individuals with persistent migraine headaches are each to be given two different drugs and a for two weeks each. The order of how the drugs are administered is randomized. Who are the subjects in this study?

3 In a weight loss study, 100 overweight persons are to be given the same diet (i.e., a single treatment) and their weights measured at the end of each week for 12 weeks to assess their weight loss over time. Who are the subjects in this study?

50 Example: Sales of Athletic Shoes

I Suppose a manufacturer of

athletic shoes is interested in the Treatment,Order effect of different advertising 1 2 3 4

strategies on shoe sales. Subject,1 T4 T3 T2 T1

I Four different advertising Subject,2 T3 T4 T1 T2 campaigns (T1,T2,T3,T4) are considered over the period of four Subject,3 T4 T3 T1 T2 months (one campaign used per

month) in five different test Subject,4 T2 T1 T4 T3 markets (i.e., the subjects).

Subject,5 T1 T2 T4 T3 I To the right is a hypothetical layout for this single-factor repeated measures design.

51 Advantages of Repeated Measures Designs

I Repeated measures designs provide good precision for comparing treatments because all sources of variability between subjects are excluded from the experimental error. I Only variation within subjects enters the experimental error since any two treatments can be compared directly for each subject. I Moreover, one can view subjects as serving as their own controls. I Repeated measures designs also economize on the selected subjects. I This is particularly important when only a few subjects (e.g., stores, test markets, or test sites) can be utilized for the experiment. I When effects of a treatment over time are of interest, then it is usually desirable to observe the same subject at different time points.

52 Disadvantages of Repeated Measures Designs

I Disadvantages of repeated measures designs usually involve various forms of interference. I One type of interference is an order effect, which is connected with the position in the treatment order. I For example, in evaluating multiple different advertisements, subjects tend to give higher (or lower) ratings for advertisements shown at the end of the sequence than at the beginning. I Another type of interference is a carryover effect, which is connected with the effects on the measured response from the previous treatment(s). I For example, in evaluating multiple different soup recipes, a bland recipe may get a higher (or lower) rating when preceded by a soup that is much spicier than the current soup. I Oftentimes, interference effects can be mitigated by randomization of the order of the treatments and allowing sufficient time between treatments (i.e., a washout period). I Randomization in a repeated measures design involves taking each subject, performing a random permutation to define the treatment order, and selecting independent permutations for the different subjects.

53 Repeated Measures vs. Repeated Observations

I Repeated measures designs are not the same as when we have designs with repeated observations.

I In repeated measures designs, several or all of the treatments are applied to the same subject.

I Designs with repeated observations, on the other hand, are designs where several observations on the response variable are made for a given treatment applied to an EU – usually to quantify measurement error.

I However, it is possible to develop a repeated measures design with repeated observations, as when a given subject is exposed to each treatment under study and a number of observations are made at the end of each treatment application.

54 Profile Plots

I Profile plots can be a helpful visualization tool in repeated measures designs. I They can help reveal trends under two primary settings:

I If there is a significant upward (downward) trend in the response across time for different treatments. I If there is a significant upward (downward) trend in the response if treatment order is fixed; i.e., the treatments are essentially an ordinal variable.

I Noticeable trends within the profile plots can also help identify meaningful contrasts for study (although these would, ideally, be specified during the design of the experiment).

55 Single-Factor Experiments with Repeated Measures

I We first consider repeated measures designs where treatments are based on a single factor. I Almost always, the subjects in repeated measures designs are viewed as a random sample from a population, hence they are random effects. I When treatment effects are fixed, the following model is appropriate for a single-factor repeated measures design:

Yij = µ + ρi + τj + ij , (6)

where

I µ is the overall mean (a constant); I i = 1, . . . , n and j = 1, . . . , r; I ρi are the random effects due to subject i and are iid normal with mean 0 2 and variance σρ; Pr I τj are the (fixed) treatment effects subject to the constraint j=1 τj = 0; 2 I ij is the (random) error and are iid normal with mean 0 and variance σ ; and I ij and ρi are assumed independent of one another.

56 Further Assumptions About yij

I The model we just introduced makes the following additional assumptions about the observations:

E(Yij ) = µ + τj 2 2 2 Var(Yij ) = σY = σρ + σ 2 2 0 Cov(Yij ,Yij0 ) = σρ + ωσY , j 6= j 0 Cov(Yij ,Yi0j0 ) = 0, i 6= i

2 2 I In the above, ω = σρ/σY , which is a measure (specifically, a coefficient of correlation) between any two observations for the same subject relative to that between subjects. I This is akin to the intraclass correlation coefficient, but for a repeated measures design.

I Thus, we assume in advance that any two treatment observations Yij and Yij0 for a given subject are correlated in the same fashion for all subjects. I Moreover, we assume that once the subjects have been selected, then any two observations for a given subject are independent (i.e., no interference effects).

57 Variance-Covariance Matrix

I More generally, the correlation between two variables, Yi and Yj , is defined as

σij ρij = , σiσj

where σi and σj are the standard deviations of Yi and Yj , respectively, and σij is the covariance between the two variables. I The above gives a general format to define a variance-covariance matrix. I For example, the theoretical variance and covariances for repeated measures taken successively as y1, y2, y3, and y4 is

 2  σ1 σ12 σ13 σ14 2  σ21 σ2 σ23 σ24  Σ =  2   σ31 σ32 σ3 σ34  2 σ41 σ42 σ43 σ4 I Equal variances for the treatment groups and independent, normally distributed observations are the usual ANOVA assumptions, which would mean all of the variance terms on the diagonal in the matrix above are the same (i.e., σ2) and all of the off-diagonals are 0 (independence).

58 Compound Symmetry

I A particular experiment with randomization of treatments to EUs is only a random sample of all possible randomized experiments that could have been used. I Randomization does not remove the correlation between the observations on EUs; however, the expected correlation between the EUs is assumed constant under all possible randomizations. I If the variances and correlations are constant, the covariances will have 2 the constant value σij = ρσ , which is called compound symmetry. I The matrix on the previous slide – when compound symmetry is present – is  σ2 ρσ2 ρσ2 ρσ2   ρσ2 σ2 ρσ2 ρσ2  Σ =  2 2 2 2   ρσ ρσ σ ρσ  ρσ2 ρσ2 ρσ2 σ2

59 Split-Plot Treatments are Randomized

I The assumption of compound symmetry was implicitly used for the errors of observations in the split-plot design because treatments were randomly assigned to the subplots. I The subject in the repeated measures design is equivalent to the whole-plot in the split-plot design, while the between-subjects treatment factor is equivalent to the whole-plot treatment factor in the split-plot design. I The repeated measure on a subject is analogous to the subplot in the split-plot design. I The difference between the subplot observations and the repeated measures is that treatments are randomized to the subplots in the split-plot design, whereas there is no randomization for the repeated measures. I If all repeated measures on a subject are equally correlated, then there is compound symmetry and the repeated measures design can be analyzed as a split-plot design with time of measurement as the subplot treatment factor.

60 Huynh-Feldt Condition

I The Huynh-Feldt condition is a less stringent requirement for ANOVA than compound symmetry. I The condition is to have the same variance of the difference for all possible pairs of observations taken at different time periods, say yi and yj , or 2 σ(yi−yj ) = 2λ, for i 6= j (7) for some λ > 0. I This condition can also be stated as 1 σ = (σ2 + σ2) − λ, for i 6= j (8) ij 2 i j

I The matrix of variances and covariances satisfying the Huynh-Feldt condition is called the Type H matrix. I The mean squares from an ANOVA can be used to test hypotheses about the within-subjects treatments if the Huynh-Feldt condition is satisfied.

61 Tests for the Huynh-Feldt Assumption

I A common test for the Huynh-Feldt assumption is the Mauchly W test for a Type H matrix. 2 I The test statistic is approximately χ -distributed. I The null hypothesis is that the Huynh-Feldt condition is appropriate, thus we hope to obtain a large p-value. I However, the calculation of the test statistic is handled differently in different software and textbooks. I We will not dive much into the details of this test statistic, other than to note that you might find discrepancies based on the approximations used or the software used. I When reporting results from this test, you should note the software and/or calculation being used.

62 SS for Repeated Measures

I The ANOVA SS for repeated measures has a SS for subjects (SSS) and an interaction SS between treatments and subjects (SSTr.S). I We use the following identity to break out the above effects:

(yij − y¯··) = (¯yi· − y¯··) + (¯y·j − y¯··) + (yij − y¯i· − y¯·j +y ¯··)

I The components in the above decomposition are:

total deviation: (yij − y¯··)

subject deviation: (¯yi· − y¯··)

treatment deviation: (¯y·j − y¯··)

treatment by subject error: (yij − y¯i· − y¯·j +y ¯··)

I Note that the above is analogous to the identity used for RCBDs.

63 SS for Repeated Measures

I Taking the SS of the decomposition on the previous slide (where the sums of cross-products drop out), we get n r X X 2 Total deviation: SSTot = (yij − y¯··) i=1 j=1 n X 2 Subject effect: SSS = r (¯yi· − y¯··) i=1 r X 2 Treatment effect: SSTr = n (¯y·j − y¯··) j=1 n r X X 2 Treatment by subject effect: SSTr.S = (yij − y¯i· − y¯·j +y ¯··) , i=1 j=1 where no SSE is present here because there are no replications. I Note that sometimes SSTr and SSTr.S are sometimes combined into a within-subjects SS (SSW) such that SSTot = SSS + SSW.

64 ANOVA and Testing

I The ANOVA table is given as follows: Source df SS MS E(MS) 2 2 Subjects n − 1 SSS MSS σ + rσρ P 2 2 j τj Treatments r − 1 SSTr MSTr σ + n r−1 Error (n − 1)(r − 1) SSTr.S MSTr.S σ2 Total nr − 1 SSTot I The appropriate test statistic for the test on treatment effects:

H0 : τ1 = τ2 = ··· = τr = 0

HA : not all τj equal 0

is MSTr F ∗ = ∼ F MSTr.S (r−1),(r−1)(n−1)

65 Example: Wine-Judging Competition In a wine-judging competition, j = 4 Chardonnay wines of the same vintage were judged by i = 6 experienced judges. Each judge tasted the wines in a blind fashion; i.e., without knowing the wine they were tasting. The order of the wine presentation was randomized independently for each judge. To reduce carryover and other interference effects, the judges did not drink the wines and thoroughly rinsed their mouths between tastings. Each wine was scored on a 40-point scale with larger scores indicating greater excellence of the wine. The judges are considered to be a random sample from a population of possible judges while the wines in the study are of interest in themselves. Hence, we will use a single-factor repeated measures model with the effects of subjects (judges) treated as random and the effects of treatments (wines) treated as fixed. The data are below:

Judge Wine (j) (i) 1 2 3 4 1 20 24 28 28 2 15 18 23 24 3 18 19 24 23 4 26 26 30 30 5 22 24 28 26 6 19 21 27 25

66 Example: Wine-Judging Competition

I To the right is a profile plot of the Wine-Judging Comptetion wine data. 30 Judge

I We see that there are some 1 2 distinct differences in ratings 3 4 5

between judges, but the ratings 25 6 for wines 3 and 4 are consistently

best, while wine 1 is generally the Score

worst. 20

I We also see that the rating curves for the judges do not appear to

exhibit substantial departures from 15 being parallel, hence an additive 1 2 3 4 Wine model is appropriate.

67 Example: Wine-Judging Competition

Mauchly Tests for Sphericity

Test statistic p-value wine 0.35156 0.5772

I Above is the Mauchly W test for sphericity.

I The p-value is 0.5772, so the test is not statistically significant against the Huynh-Feldt condition (i.e., sphericity is an appropriate assumption).

I The above results were obtained in R, so calculations in different packages might differ from the above.

68 Example: Wine-Judging Competition

Analysis of Variance Table

Response: score Df Sum Sq Mean Sq F value Pr(>F) judge 5 173.33 34.667 32.5 1.549e-07 *** wine 3 184.00 61.333 57.5 1.854e-08 *** Residuals 15 16.00 1.067 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1

I Above is the ANOVA table for the wine-tasting competition data. I The test of treatment effects has the following test statistic: MSTr 61.333 F ∗ = = = 57.5, MSTr.S 1.067

which follow an F3,15 distribution. I The p-value for the above test is considerably lower than 0.05, so we conclude that the mean wine ratings for the four wines differ.

69 Using Split-Plot ANOVA

I If we can reasonably assure ourselves that the ANOVA assumptions are valid for repeated measures on each subject in the treatment groups, then the split-plot mean squares can be used to test hypotheses about the treatment means and their interactions with time. I This can be used when we have more than one subject to which each treatment is applied. I The split-plot design linear model of interest for our set-up is

Yijk = µ + αi + dik + βj + (αβ)ij + ijk, (9)

where I µ is the overall mean (a constant); I i = 1, . . . , a, j = 1, . . . , b, and k = 1, . . . , n; Pa I αi are the (fixed) effects of treatment subject to the constraint i=1 αi = 0; I dik are the (random) experimental errors for subjects within treatment and are iid normal with 2 mean 0 and variance σd; Pb I βj are the (fixed) effects of time subject to the constraint j=1 βj = 0; I (αβ)ij are the (fixed) effects due to the interaction of subject and treatment subject to the Pa Pb constraint i=1(αβ)ij = j=1(αβ)ij = 0; 2 I ijk are the (random) errors and are iid normal with mean 0 and variance σ ; and I dik and ijk are assumed independent of one another.

70 Outline of Topics

1 Split-Plot Designs

2 Split-Split-Plot Designs

3 Split-Block Designs

4 Repeated Measures Designs

5 Handling Ranked Data

6 Expected Mean Squares

71 Ranking Observations

I In repeated measures studies, the observations are sometimes ranks, as when a number of tasters are each asked to rank recipes or when several university admissions officers are each asked to rank applicants for admission. I When the data in a repeated measures study are ranks, we can use the nonparametric rank F -test for testing whether or not the treatment means are equal.

I The observations Yij for each subject need to be ranked first in ascending order. th I Let Rij denote the rank of Yij when the observations for the i subject are ranked from 1 to r.

I In the case of ties, each of the tied observations is given the mean of the ranks involved. I We are interested in testing the alternatives

H0 : µ·1 = µ·2 = ... = µ·r

HA : at least one µ·j differs.

72 Test Statistic

I The F -statistic is now based on the ranks as follows: MSTR F ∗ = , (10) R MSRM where Pr 2 n (R¯·j − R¯··) MSTR = j=1 r − 1 Pn Pr 2 (Rij − R¯·j ) MSRM = i=1 j=1 (n − 1)(r − 1) Pn R R¯ = i=1 ij ·j n r + 1 R¯ = R¯ = . ·· i· 2

I MSTR is the mean square due to the treatment while MSRM can be thought of as a mean square due to the repeated measures.

73 Interpreting the Test

I If there are no treatment differences, all ranking permutations for a subject are assumed to be equally likely and the statistic ∗ FR will be distributed approximately as Fr−1,(n−1)(r−1), provided the number of subjects is not too small.

I Large values of the test statistic lead to the conclusion that the treatments have unequal effects.

I We can also address multiple comparisons in a way similar to how we handled multiple comparisons for the continuous response settings.

74 Large-Sample Bonferroni Pairwise Comparisons

I We can use a large-sample testing analog of the Bonferroni pairwise comparison procedure to obtain information about the comparative magnitudes of the treatment means when the nonparametric rank F -test indicates that the treatment means differ. I Testing limits for all g = r(r − 1)/2 pairwise comparisons using the mean ranks R¯·j are set up as follows for the joint confidence level of significance α: r r(r + 1) (R¯ − R¯ 0 ) ± z . (11) ·j ·j 1−α/(2g) 6n

I If the testing limits include 0, then we conclude that the corresponding treatment means µ·j and µ·j0 do not differ. I If they do not include 0, then we conclude that the two corresponding treatment means differ. I We can then setup groups of treatments whose means do not differ according to this simultaneous testing procedure.

75 Example: Sweetener n = 6 subjects were each asked to rank r = 5 coffee sweeteners according to their taste preference, with a rank of 5 being their most preferred sweetener. The data are given below and suggest that a sweetener effect may be present; e.g., no judge ranked sweetener B higher than 2. Subject Sweetener (j) (i) ABCDE 1 5 1 2 4 3 2 4 2 1 5 3 3 3 2 1 4 5 4 5 2 3 4 1 5 4 1 2 3 5 6 4 1 3 5 2 R¯·j 4.17 1.50 2.00 4.17 3.17

76 Example: Sweetener Rankings

Analysis of Variance Table

Response: rank Df Sum Sq Mean Sq F value Pr(>F) sweetener 4 36 9.00 9.375 9.019e-05 *** Residuals 25 24 0.96 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Note that we only use the above single-factor ANOVA table to obtain the SSTR (36) and the SSE (24), which are the numerators for MSTR and MSRM, respectively. The rest of the table is not used for our test. We wish to test

H0 : µ·1 = µ·2 = µ·3 = µ·4 = µ·5

HA : at least one µ·j differs. The test statistic here is

∗ MSTR 36/(5 − 1) 9.00 F = = = = 7.50 ∼ F4,20, R MSRM 24/((6 − 1)(5 − 1)) 1.20 which has a p-value of 0.0007, indicating highly significant evidence of a treatment effect.

77 Example: Sweetener Rankings So which sweeteners differ? We will use a joint level of significance of α = 0.20. To construct the Bonferroni pairwise comparisons, we have g = 10, so that r r(r + 1) √ z = 2.33 0.91 = 2.12 1−α/(2g) 6n The comparisons are given below: Comparisons Difference Bonferroni CI Different? A B -2.67 (-4,79, -0.54) Yes C -2.17 (-4.29, -0.04) Yes D 0.00 (-2.12, 2.12) No E -1.00 (-3.12, 1.12) No B C 0.50 (-1.62, 2.62) No D 2.67 (0.54, 4.79) Yes E 1.67 (-0.46, 3.79) No C D 2.17 (0.04, 4.29) Yes E 1.17 (-0.96, 3.29) No D E -1.00 (-3.12, 1.12) No

78 Example: Sweetener Rankings From the table on the previous slide, we can see that A and B differ, A and C differ, B and D differ, and C and D differ. Therefore, all other pairings do not differ. Note that we can further group these sweeteners into treatments that do not differ: Group 1 Group 2 Sweetener B R¯·2 = 1.50 Sweetener E R¯·5 = 3.17 Sweetener C R¯·3 = 2.00 Sweetener A R¯·1 = 4.17 Sweetener E R¯·5 = 3.17 Sweetener D R¯·4 = 4.17 Thus, we conclude that with joint confidence level 0.20, that sweeteners A and D are preferred to sweeteners B and C, and that it is not clear as to which group sweetener E would belong.

79 Outline of Topics

1 Split-Plot Designs

2 Split-Split-Plot Designs

3 Split-Block Designs

4 Repeated Measures Designs

5 Handling Ranked Data

6 Expected Mean Squares

80 Expected Mean Squares

I In the ANOVA tables we have presented thus far, we have often reported expected mean square (E(MS)) values, but did not emphasize how to obtain those expressions. I There is a basic recipe that can be followed to obtain these expressions, and how to calculate them is a matter of practice. 2 I The E(MS) for the MSE is σ . I In the case of a restricted model, for every other model term, the E(MS) contains σ2 plus either the variance component or the fixed effect component for that term, plus those components for all other model terms that contain the effect in question and that involve no interactions with other fixed effects. I The coefficient of each variance component or fixed effect is the number of observations at each distinct value of that component. I A full outline of the steps is given in Appendix D.3 of Applied Linear Statistical Models, Fifth Edition (2005) by Kutner et al. I We will illustrate the E(MS) calculations with some concrete examples of models we have already seen. I For all models, let i = 1, . . . , a, j = 1, . . . , b, and k = 1, . . . , n, so that we are working with a balanced design.

81 Example: Two-Factor Fixed Effects For the two-factor fixed effects model (with interaction), we have

Yijk = µ + αi + βj + (αβ)ij + ijk, where all of the usual assumptions are in place. Let us find the E(MSAB), i.e., the E(MS) of the interaction term. The E(MS) will contain only the fixed effect for the AB interaction (because no other model terms contain AB) plus σ2, and the fixed effect for AB will be multiplied by n because there are n observations at each distinct value of the interaction component (the n observations in each cell). Thus, the E(MS) for AB is Pa Pb 2 n (αβ)ij E(MSAB) = σ2 + i=1 j=1 (a − 1)(b − 1) As a further illustration, consider the E(MS) for the main effect A: bn Pa α2 E(MSA) = σ2 + i=1 i (a − 1) The multiplier in the numerator is bn because there are bn observations at each level of A. The AB interaction term is not included in the E(MS) because while it does include the effect in question (A), factor B is a fixed effect.

82 Example: Two-Factor Random Effects To illustrate the calculations for random effects, consider the two-factor random effects model

Yijk = µ + ai + bj + (ab)ij + ijk, where all of the usual assumptions are in place. The E(MS) for the AB interaction would then be 2 2 E(MSAB) = σ + nσab and the E(MS) for the main effect of A would be 2 2 2 E(MSA) = σ + nσab + bnσa Note that the variance component for the AB interaction term is included because A is included in AB and B is a random effect.

83 Example: Two-Factor Mixed Effects (Unrestricted) Next consider the unrestricted form of the two-factor mixed effects model

Yijk = µ + αi + bj + (αb)ij + ijk, where A is a fixed effect, B is a random effect, and all of the usual assumptions are in place. In the unrestricted version, the interaction term is treated as fixed. The E(MS) for the AB interaction is once again 2 2 E(MSAB) = σ + nσαb but now the E(MS) for the main effect of A would be Pa α2 E(MSA) = σ2 + nσ2 + bn i=1 i αb (a − 1) The interaction variance component is included because A is included in AB and B is a random effect. For the main effect of B, the E(MS) is 2 2 2 E(MSB) = σ + nσαb + anσb Here, the interaction variance component is not included, because while B is included in AB, A is a fixed effect.

84 Example: Two-Factor Mixed Effects (Restricted) Finally, consider the restricted form of the two-factor mixed effects model, where the interaction term is random, but has the further Pa constraint that i=1(αb)ij = 0. For the E(MS), simply include the term for the effect in question, plus all the terms that contain this effect as long as there is at least one random factor. To illustrate, the E(MS) for the interaction AB is 2 2 E(MSAB) = σ + nσαb For the main effect A – the fixed factor – the E(MS) is bn Pa α2 E(MSA) = σ2 + nσ2 + i=1 i αb a − 1 and for the main effect B – the random factor – the E(MS) is 2 2 E(MSB) = σ + anσb

85 Remark on Nested Effects

I The same recipe used for the previous examples also applies when we have nested designs.

I If any level of the nested hierarchy is random, then that makes the entire effect random.

I Thus, the E(MS) would be calculated using the E(MS) formulation for random effects given in the examples.

86 This is the end of Unit 10.

87