100
Topics in Biometry Course: Session 5 1 Topics in Biometry Factorial and Split-plot experiments based on Chris Brien’s notes (University of South Australia, Adelaide), http://chris.brien.name/ee2/ Clarice G. B. Dem´ etrio Departamento de Ciˆ encias Exatas ESALQ/USP Piracicaba, SP, Brasil June 2007 University of Hasselt, Diepenbeek, Belgium email: [email protected]

Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 1'

&

$

%

Topics in Biometry

Factorial and Split-plot experimentsbased on Chris Brien’s notes (University of South Australia, Adelaide),

http://chris.brien.name/ee2/

Clarice G. B. DemetrioDepartamento de Ciencias Exatas

ESALQ/USP

Piracicaba, SP, Brasil

June 2007

University of Hasselt, Diepenbeek, Belgium

email: [email protected]

Page 2: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 2'

&

$

%

Course Outline

Session 5: June 4, 13:30 – 17:00

VII.A Design of factorial experiments

a) Obtaining a layout for a factorial experiment in R

VII.B Advantages of factorial experiments

a) Interaction in factorial experiments

b) Advantages over one-factor-at-a-time experiments

VII.C Indicator-variable models and estimation for factorial experiments

a) Maximal model for two-factor CRD experiments

b) Alternative expectation models

VII.D Hypothesis testing using the ANOVA method for factorialexperiments

a) Determining the ANOVA table for a two-Factor CRD

b) Analysis of an example

Page 3: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 3'

&

$

%

c) Sums of squares for the analysis of variance

d) Expected mean squares

e) Summary of the hypothesis test

f) Computation of the ANOVA and diagnostic checking in R

g) Box-Cox transformations for correcting transformablenon-additivity

VII.E Treatment differences

a) Multiple comparisons procedures

b) Polynomial submodels

VII.E Summary

VII.F Exercise

Page 4: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 4'

&

$

%

VII.A Design of factorial experiments

Definition VII.1: Experiments that involve more than one randomizedor treatment factor are called factorial experiments.

In general, the number of treatments in a factorial experiment is theproduct of the numbers of levels of the treatment factors. Thedisadvantage of this is that the number of treatments increases veryquickly.

Given the number of treatments, the experiment could be laid out as aCompletely Randomized Design, a Randomized Complete BlockDesign or a Latin Square with that number of treatments. Theincomplete block designs, such as BIBDs or Youden Squares are notsuitable for factorial experiments.

The advantages of factorial experiments are that they are moreefficient than the traditional “one-at-a-time” approach and they alsowork better when the factors interact with each other.

Page 5: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 5'

&

$

%

a) Obtaining a layout for a factorial experiment in R

Layouts for factorial experiments can be obtained in R using theexpressions for the chosen design when only a single-factor is involved.

The difference with factorial experiments is that the several treatmentfactors are entered in either Yates or standard order.

For Yates order, as opposed to standard order, the first factor changesfastest, last slowest whereas the first factor changes slowest and thelast fastest in standard order.

It is convenient to use the function fac.gen to generate a designcontaining the treatment factors with their levels arranged Yates order.

The Random.Order vector is then used as usual to obtain the layoutusing a Completely Randomized Design, a Randomized CompleteBlock Design or a Latin Square.

Page 6: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 6'

&

$

%

Example VII.1 Fertilizing oranges

Suppose an experimenter is interested in investigating the effect ofnitrogen and phosphorus fertilizer on yield of oranges. It was decidedto investigate 3 levels of Nitrogen (viz 0, 30, 60 kg/ha) and 2 levels ofPhosphorus (viz. 0, 20 kg/ha). The yield after six months wasmeasured.

For a factorial experiment, the treatments are all possiblecombinations of the 3 Nitrogen × 2 Phosphorus levels: 3× 2 = 6treatments. The treatment combinations, arranged in Yates order, are:

Treatment N P

1 0 0

2 30 0

3 60 0

4 0 20

5 30 20

6 60 20

Page 7: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 7'

&

$

%

A layout for this experiment in a CRD with three replicates of eachtreatment is generated in R as shown in the following output.

Standard.Order Seedling N P

1 2 1 30 0

2 18 2 60 20

3 4 3 0 20

4 5 4 30 20

5 7 5 0 0

6 12 6 60 20

7 15 7 60 0

8 13 8 0 0

9 6 9 60 20

10 1 10 0 0

11 10 11 0 20

12 16 12 0 20

13 8 13 30 0

14 14 14 30 0

15 3 15 60 0

16 11 16 30 20

17 9 17 60 0

18 17 18 30 20

Page 8: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 8'

&

$

%

R program for CRD factorial Orange data

#install.packages(repos=NULL, pkgs="path\\dae_0.1-1.zip")install.packages(repos=NULL,pkgs="C:\\clarice\\Chris\\Course2007\\R-prog\\dae_0.1-1.zip")# in R change directory to pathlibrary(dae)

# CRD# set up treatment factorsfnames <- list(N = c(0, 30, 60), P = c(0, 20))CRDFac2.Treats <- fac.gen(levels = c(3, 2),factor.names = fnames,replications = 3,order= "yates")

# randomizeset.seed(105)n <- 18Standard.Order <- factor(1:n)Seedling <- order(runif(n))CRDFac2.Design <- data.frame(Standard.Order, Seedling, CRDFac2.Treats)remove("Standard.Order", "Seedling", "CRDFac2.Treats")CRDFac2.Design[CRDFac2.Design$"Seedling",] <- CRDFac2.DesignCRDFac2.Design #use the last three columns to give to the scientist

Page 9: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 9'

&

$

%

VII.B Advantages of factorial experiments

a) Interaction in factorial experiments

The major advantage of factorial experiments is that they allow thedetection of interaction.

Definition VII.2: Two factors are said to interact if the effect of one,on the response variable, depends upon the level of the other. If theydo not interact, they are said to be independent.

Other terms that are synonymous with interact are dependent andnonadditive.To investigate whether two factors interact, the simpleeffects are computed.

Definition VII.3: A simple effect for the means computed for eachcombination of at least two factors is the difference between two ofthese means having different levels of one of the factors but the samelevels for all other factors.

Page 10: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 10'

&

$

%

We talk of the simple effects of a factor for the levels of the otherfactors. If there is an interaction, we can compute an interaction effectfrom the simple effects to measure the size of the interaction.

Definition VII.4: An interaction effect is half the difference of twosimple effects for two different levels of just one factor or is half thedifference of two interaction effects.

If there is not an interaction we can separately compute the maineffects to see how each factor affects the response.

Definition VII.5: A main effect of a factor is the difference betweentwo means with different levels of that factor, each mean having beenformed from all observations having the same level of the factor.

Page 11: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 11'

&

$

%

Example VII.2 Chemical reactor experiment

Consider a factorial experiment to investigate the effect of catalyst andtemperature on the yield of chemical from a chemical reactor.Suppose there were two levels of each of the factors and that the tableof means from the experiment was as follows:

Temperature (oC)

Catalyst 160 180 Difference

A 60 72 12

B 52 64 12

Difference -8 -8 0

Clearly, the difference between (effect of) the temperatures isindependent of which catalyst is used.

The interaction effect is [12 -12]/2 = 0.

The situation can be illustrated using an interaction plot, in whichthe means for the combinations of the factors are plotted (see Figure1).

Page 12: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 12'

&

$

%

A set of parallel lines indicates that there is no interaction the slope ofthese lines is proportional to the simple effects which are equal. Ifthere was an interaction the simple effects would not be equal and sothe lines would not be parallel.

Note that the statement about the independence of two factors issymmetrical in the two factors. Thus the difference between (effectof) the catalysts is independent of which temperature is used. Theinteraction effect is still zero.

So we can say that temperature and catalyst are independent in theireffects on yield. In reality, we need to qualify this to say they areadditively independent (the ratios are not the same). We could alsosay that they are additive in their effects. The practical import of thisstatement is that we can consider each factor separately. Indeedlooking at the overall means for a factor will indicate what ishappening in the experiment.

Page 13: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 13'

&

$

%

For this experiment, the overall means are:

Temperature (oC)

160 180

Mean 56 68

Catalyst

A B

Mean 66 58

So the differences between the means in these tables are the maineffects of the factors. That is, the main effect of Temperature is 12and that of Catalyst is -8. Note that in this case the main effects arethe same as the individual difference calculated above and so theysummarize the effect of the factors. Having used the two-way table ofmeans to work out that there is no interaction, it can be abandonedfor the purposes of summarizing the results of the analysis.

Page 14: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 14'

&

$

%

5560

6570

Temperature

mea

n of

Yie

lds

160 180

Catalyst

AB

5560

6570

7580

Temperature

mea

n of

Yie

lds

160 180

Catalyst

BA

Figure 1: Chemical reactor experiments. Interaction plots

The first plot shows that there is no interaction between Temperatureand Catalyst while the second shows interaction between Temperatureand Catalyst.

Page 15: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 15'

&

$

%

Example VII.3 Second chemical reactor experiment

Suppose the experiment was run with a second reactor and the resultswere as follows:

Temperature (oC)

Catalyst 160 180 Difference

A 60 72 12

B 52 83 31

Difference -8 -11

Thus the difference between (effect of) the temperatures depends onwhich catalyst is used. Again, this statement is symmetrical in thefactors and so we say that the two factors interact. The interactionplot for this example is shown in Figure 1.

There is clearly an interaction as the lines have different slopes. In anexperiment in which two factors interact, it is not appropriate tosummarize the results using the overall means.

Page 16: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 16'

&

$

%

b) Advantages over one-factor-at-a-time experiments

It is sometimes suggested that rather than complicate things byputting several factors into a single experiment, it would be better torun several experiments each of which investigate one of the factors ofinterest.

However, this is not the case as you will be unable to determinewhether or not there is an interaction.

Take our temperature-catalyst experiment again. One could run anexperiment to examine just the temperature effect and would have tokeep the catalyst used constant during the experiment.

Suppose it is decided to use catalyst B. The implication of this is thatthe results of this experiment apply only to the conditions under whichthe experiment was run. That is, when catalyst B is used.

Page 17: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 17'

&

$

%

To look at the other factor, a second experiment with 2 differentcatalysts would be run, but the same temperature used throughout say160oC.

WELL YOU HAVE ONLY APPLIED THREE OF THE FOURPOSSIBLE COMBINATIONS OF THE TWO FACTORS catalyst A at180oC has not been tested but catalyst B at 160oC has been testedtwice as indicated in the following table:

Experiment 1

Temperature (oC)

Catalyst 160 180

A 60 ?

Experiment 2

B 52 83

Page 18: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 18'

&

$

%

The results of the experiments would indicate that temperatureincreases yield by 31g and that the catalysts differ by 8g in yield.

However, these conclusions are restricted if we presume the factorsact additively we would predict the yield for catalyst A at 160C to be60+31 = 83 + 8 = 91.

This is quite clearly erroneous we need the factorial experiment todetermine if there is an interaction; exactly the same total amount ofresources are involved in the two alternative strategies, assuming thenumber of replicates is the same in all the experiments.

Factorial experiment also have the advantage that, if the factors areadditive then the main effects are estimated with greater precision. Inthe one-factor-at-a time experiments the effect of a particular factor isestimated as the difference between two means each based on robservations where r is the number of replicates of each treatments.

Page 19: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 19'

&

$

%

In the factorial experiment the main effects of the factors are thedifference between two means based on 2r observations whichrepresents a

√2 increase in precision.

The improvement in precision will be greater for more factors andmore levels; for a 3× 3× 3 = 33 experiment the main effects are basedon 9r observations leading to a 3 fold increase in precision overone-factor-at-a-time experiments.

To summarize, relative to one-factor-at-a-time experiments, factorialexperiments have the advantages that:

1. if the factors interact, factorial experiments allow this to bedetected and estimates of the interaction effect can be obtained, and

2. if the factors are independent, factorial experiments result in theestimation of the main effects with greater precision.

Page 20: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 20'

&

$

%

VII.C Indicator-variable models and estimation for factorialexperiments

The models for the factorial experiments will depend on the designused in assigning the treatments that is, CRD, RCBD or LS.

The design will determine the unrandomized factors and the terms tobe included involving those factors. They will also depend on thenumber of randomized factors.

a) Maximal model for two-factor CRD experiments

We will consider the models for the two-factor CRD. Let the totalnumber of observations be n and the factors be A and B with a and blevels, respectively. Suppose that the combinations of A and B areeach replicated r times that is, n = a× b× r.

Page 21: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 21'

&

$

%

The maximal model for a two-factor CRD experiment, where the tworandomized factors A and B are fixed, is:

ψAB = E(Y) = XABα(γ) and var(Y) = VY = σ2UIn

where

Y is the n-random vector of random variables representing theresponse variable,

β is the ab-vector of parameters for the A-B combinations,

XAB is the n× ab matrix giving the combinations of A and B thatoccurred on each unit, i.e the X matrix for the generalized factorA∧B, and

σ2U is the variability arising from different units.

Our model also involves assuming Y ∼ N(ψAB ,VY).

Page 22: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 22'

&

$

%

Definition VII.6: Suppose we have the factors A, B, , Z with a, b,. . ., z levels, respectively, each of which has n = ab . . . z values. Thevalues of the factors are in standard order when

1. for any factor, the values of a factor consist of repetitions of thesequence of its levels that begins with the first level and goes to thelast level, with the factor A consisting of just a single sequence; and

2. the number of consecutive values with the same level of a factor isthe product of the numbers of levels of all the factors to its right, withfactor Z changing with every value.

That is the values of the factors are systematically ordered in ahierarchical fashion – they are ordered according to A, then B, then C,. . . and then Z.

Suppose, the elements of the Y vector for our two-factor CRD arearranged so that the values of the factors A, B and a dummy factor,say Replications, are in standard order. Then

XAB = Ia ⊗ Ib ⊗ 1r

Page 23: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 23'

&

$

%

Example VII.4 A 2× 2 Factorial experiment

Suppose A and B have two levels each and that each combination of Aand B is replicated 3 times. Hence, a = b = 2, r = 3 and n = 12.Then

(αβ)′ = (αβ11, αβ12, αβ21, αβ22)

Suppose Y is arranged so that the values of A, B and Reps are instandard order that is

Y′ = (Y11, Y11, Y11, Y12, Y12, Y12, Y21, Y21, Y21, Y22, Y22, Y22)

ThenXAB = I2 ⊗ I2 ⊗ 13

Page 24: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 24'

&

$

%

For the maximal model,

ψAB = E[Y] = XAB(αβ) =

1 0 0 0

1 0 0 0

1 0 0 0

0 1 0 0

0 1 0 0

0 1 0 0

0 0 1 0

0 0 1 0

0 0 1 0

0 0 0 1

0 0 0 1

0 0 0 1

(αβ)11

(αβ)12

(αβ)21

(αβ)22

=

(αβ)11

(αβ)11

(αβ)11

(αβ)12

(αβ)12

(αβ)12

(αβ)21

(αβ)21

(αβ)21

(αβ)22

(αβ)22

(αβ)22

That is, the maximal model allows for a different response for eachcombination of A and B.

Page 25: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 25'

&

$

%

b) Alternative expectation models

The alternative models for the expectation that are usually consideredare:

ψAB = E(Y) = XAB(αβ) (A and B interact in effect on response)

ψA+B = E(Y) = XAα + XBβ (A and B independently affectresponse)

ψA = E(Y) = XAα (A only affects response)

ψB = E(Y) = XBβ (B only affects response)

ψG = E(Y) = XGµ (no factors affect response)

Again, suppose the elements of the Y vector for our two-factor CRDare arranged so that the values of the factors A, B and a dummyfactor, say Reps, are in standard order. Then

XG = 1a⊗1b⊗1r = 1abr, XA = Ia⊗1b⊗1r, XB = 1a⊗Ib⊗1r and

XAB = Ia ⊗ Ib ⊗ 1r

Page 26: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 26'

&

$

%

Example VII.5 A 2× 2 Factorial experiment

Suppose A and B have two levels each and that each combination of Aand B is replicated 3 times. Hence, a = b = 2, r = 3 and n = 12.Then

α′ = (α1α2), β′ = (β1β2) and (αβ)′ = (αβ11, αβ12, αβ21, αβ22)

Suppose Y is arranged so that the values of A, B and Reps are instandard order that is

Y′ = (Y11, Y11, Y11, Y12, Y12, Y12, Y21, Y21, Y21, Y22, Y22, Y22)

Then

XG = 12⊗12⊗13 = 112, XA = I2⊗12⊗13, XB = 12⊗I2⊗13 and

XAB = I2 ⊗ I2 ⊗ 13

Page 27: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 27'

&

$

%

XG =

1

1

1

1

1

1

1

1

1

1

1

1

XA =

1 0

1 0

1 0

1 0

1 0

1 0

0 1

0 1

0 1

0 1

0 1

0 1

XB =

1 0

1 0

1 0

0 1

0 1

0 1

1 0

1 0

1 0

0 1

0 1

0 1

XAB =

1 0 0 0

1 0 0 0

1 0 0 0

0 1 0 0

0 1 0 0

0 1 0 0

0 0 1 0

0 0 1 0

0 0 1 0

0 0 0 1

0 0 0 1

0 0 0 1

Notice that XG can be written as a linear combination of the columnsof each of the other three and that XA and XB can be written aslinear combinations of the columns of XAB .

Page 28: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 28'

&

$

%

We note the following marginality relations between the models:

XGµ is marginal to XAα, XBβ, XAα + XBβ and XAB(αβ); orψG ≤ ψA,ψB , ψA+B ,ψAB

XAα, XBβ are marginal to XAα + XBβ and XAB(αβ); orψA,ψB ≤ ψA+B , ψAB

XAα + XBβ is marginal to XAB(αβ); or ψA+B ≤ ψAB

Page 29: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 29'

&

$

%

The estimators of the fitted values under the different models are:

Model Estimator

ψAB = XAB(αβ) ψAB = (A ∧B) = MABY = r−1Ia ⊗ Ib ⊗ JrYψA+B = XAα + XBβ ψA+B = A + B− GψA = XAα ψA = A = MAY = (br)−1Ia ⊗ Jb ⊗ JrYψB = XBβ ψB = B = MBY = (ar)−1Ja ⊗ Ib ⊗ JrYψG = XGµ ψG = G = MGY = n−1Ja ⊗ Jb ⊗ JrY

where

G is the n-vector containing just the grand mean.

A is the n-vector of A means.

B is the n-vector of B means.

(A ∧B) is the n-vector of means for the combinations of A and B,that is for the generalized factor A ∧B.

Page 30: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 30'

&

$

%

VII.C Hypothesis testing using the ANOVA method for factorialexperiments

a) Analysis of an example

Example VII.6 Lilium experiment (continued):

The hypothesis test for this example is as follows:

Step 1: Set up hypotheses

a) H0: there is no interaction between Hormones and Temperature(αβ)jk − (αβ)j. − (αβ).k + (αβ).. = 0

H1 : there is an interaction between Hormones and Temperature(αβ)jk − (αβ)j. − (αβ).k + (αβ).. 6= 0

b) H0: there is no Hormone effect αA1 = αA2 = αA3

H1 : not all population Hormone means are equal

c) H0: there is no Temperature effect βB1 = βB2 = βB3

H1 : not all population Temperature means are equal

Set α = 0.05

Page 31: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 31'

&

$

%

5055

6065

Hormone

mea

n of

Day

s

1 2 3

Temp

312

5055

6065

Temp

mea

n of

Day

s

1 2 3

Hormone

132

4850

5254

Hormone

mea

n of

Day

s

1 2

Temp

312

4850

5254

Temp

mea

n of

Day

s

1 2 3

Hormone

21

Figure 2: Lilium experiment. Interaction plots (first two for the 9 treatments,showing interaction; next two considering 6 treatmentos, showing no interaction)

Page 32: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 32'

&

$

%

Step 2: ANOVA table using R

Using the 9 treatments

Source df SSq MSq F Prob

Units 71 6672.0Treatments 8 2492.3 311.5 4.69 0.0001529 ***

Hormone 2 1553.3 776.6 11.70 4.7e− 05 ***

Temp 2 104.3 52.2 0.78 0.45995Hormone:Temp 4 834.7 208.7 3.14 0.02017 *

Residual 63 4179.8 66.3

Step 3: Decide between hypotheses

The evidence suggests that there is Interaction between Hormones andTemperatures for before planting (Look at the residual plots!).

Page 33: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 33'

&

$

%

Eliminating the first 3 treatments and using the other 6treatments (talk to the scientist before doing this)

Source df SSq MSq F Prob

Units 47 1621.9Treatments 5 269.92 53.98 1.68 0.1613

Hormone 1 147.00 147.00 4.57 0.03847 *

Temp 2 114.54 57.27 1.78 0.1813Hormone:Temp 2 8.38 4.19 0.13 0.8784

Residual 42 1352.00 32.19

Step 3: Decide between hypotheses

The evidence suggests that there is no Interaction between Hormonesand Temperatures before planting, and that there is a Hormone effect(Look at the residual plots!).

Page 34: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 34'

&

$

%

b) Sums of squares for the analysis of variance

The estimators of the sum of squares for a two-factor CRD ANOVAare the sums of squares of the following vectors:

Total or Units Deviation:DG = Y − G = (MU −MG)Y = QUY with QU = MU −MG

A Effect: Ae = A− G = (MA −MG)Y = QAY with QA = MA −MG

B Effect: Be = B− G = (MB −MG)Y = QBC with QB = MB −MG

A:B Effect: (A∧B)e = (A ∧B)− A− B+ G = (MAB −MA−MB +MG)Y =QABY with QAB = MAB −MA −MB + MG

Residual Deviation: DAB = Y − (A ∧B) = Y − (A ∧B)e −Ae −Be − G =(MU −MAB)Y = QURes

Y with QURes= MU −MAB

where the D’s are n-vectors of deviations from Y and Ae, Be and (A ∧B)e aren-vectors of A, B and A:B effects.

Page 35: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 35'

&

$

%

Theorem VII.1: For a two-factor CRD, the sums of squares in theanalysis of variance for Units, A, B, A:B and Residual are given by thequadratic forms

Y′QUY = D′GDG, Y′QAY = A′eAe, Y′QBY = B′eBe,

Y′QABY = D′ABDAB and Y′QURes

Y = D′ABDAB ,

respectively, where

QU = MU −MG, QRA = MA −MG, QB = MB −MG,

QAB = MAB −MA −MB + MG, QURes = MU −MAB ,

Y = InY = MUY = Ia ⊗ Ib ⊗ IrY,

G = MGY = n−1Ja ⊗ Jb ⊗ JrY,

A = MAY = (br)−1Ia ⊗ Jb ⊗ JrY,

B = MBY = (ar)−1Ja ⊗ Ib ⊗ JrY,

(A ∧B) = MABY = r−1Ia ⊗ Ib ⊗ JrY

All the M’s and Q’s are symmetric (M = M′, Q = Q′) andidempotent (MM = M, QQ = Q).

Page 36: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 36'

&

$

%

So the analysis of variance table is constructed as follows:

Source df SSq MSq E(MSq) F Prob

Units abr − 1 Y′QUY

A a− 1 Y′QAY s2A σ2 + qA(ψ)

s2A

s2URes

pA

B b− 1 Y′QBY s2B σ2 + qB(ψ)

s2B

s2URes

pB

A:B (a− 1)(b− 1) Y′QABY s2AB σ2 + qAB(ψ)

s2AB

s2URes

pAB

Residual ab(r − 1) Y′QUResY s2URes

σ2

where s2A =

Y′QAYa− 1

, s2B =

Y′QBYb− 1

, s2AB =

Y′QABY(a− 1)(b− 1)

and

s2URes

=Y′QURes

Yab(r − 1)

.

Page 37: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 37'

&

$

%

Y′QUY =∑n

i=1 Y 2i − correction, where correction =

(∑n

i=1 Yi)2

abr

Y′QAY =1br

a∑

j=1

A2j − correction, where Aj is total of br replicates

for the j-th level of Factor A

Y′QBY =1ar

t∑

k=1

B2k − correction, where Bk is total of ar replicates

for the k-th level of Factor B

Y′QABY =1r

t∑

l=1

AB2jk − correction−Y′QAY −Y′QBY, where

AB(jk) is the total of r replicates of the combination of the j-th levelof Factor A and k-th level of Factor B

Y′QUResY = Y′QUY −Y′QAY −Y′QBY −Y′QABY

Page 38: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 38'

&

$

%

d) Summary of the hypothesis test

Step 1: Set up hypotheses

a) H0: there is no interaction between A and B

(or model simpler than XAB(αβ) adequate)

((αβ)jk − (αβ)j. − (αβ).k + (αβ).. = 0, for all j, k)

H1 : there is an interaction between A and B((αβ)jk − (αβ)j. − (αβ).k + (αβ).. 6= 0, for some j, k)

b) H0: α1 = α2 = . . . = αa (or XAα not required in the model)

H1 : not all population A means are equal

c) H0: β1 = β2 = . . . = βb (or XBβ not required in the model)

H1 : not all population B means are equal

Set α = 0.05 (or 0.01).

Page 39: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 39'

&

$

%

Step 2: Calculate test statistic

Source df SSq MSq E(MSq) F Prob

Units abr − 1 Y′QUY

A a− 1 Y′QAY s2A σ2 + qA(ψ)

s2A

s2URes

pA

B b− 1 Y′QBY s2B σ2 + qB(ψ)

s2B

s2URes

pB

A:B (a− 1)(b− 1) Y′QUY s2AB σ2 + qAB(ψ)

s2AB

s2URes

pAB

Residual ab(r − 1) Y′QUResY s2

UResσ2

where s2A =

Y′QAYa− 1

, s2B =

Y′QBYb− 1

, s2AB =

Y′QABY(a− 1)(b− 1)

and

s2URes

=Y′QUResYab(r − 1)

.

Page 40: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 40'

&

$

%

Step 3: Decide between hypotheses

The fundamental point for choosing the model that best describes theexpectation of the response is that one first examines the A:Binteraction that tests for whether ψAB is zero. If it is significant, thetests for A and B effects are not proceeded with as they are onlyrelevant when A:B is not significant.

For any hypothesis, if P(F ≥ F0) = p ≤ α, then the evidence suggeststhat the null hypothesis H0 should be rejected.

If A:B is significant, we conclude that the maximal modelψAB = XAB(αβ) best describes the data.

Having determined the model to be used for the data, there is nopoint to doing any further hypothesis tests; they will not provide anyfurther information about the model.

Page 41: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 41'

&

$

%

However, if A:B is not significant, we conclude that the modelψAB = XAB(αβ) is not the best model for the data and that one ofthe models ψG = XGµ, ψA = XAα, ψB = XBβ orψA+B = XAα + XBβ will be better.

The choice between these models depends on which of A and B arenot significant.

A term corresponding to the significant source must be included in themodel.

For example, if only B is significant, the model for the data would beψB = XBβ.

If neither A nor B is significant, then the model for the data would beψG = XGµ.

Page 42: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 42'

&

$

%

f) Computation of ANOVA and diagnostic checking in R

The assumptions underlying a factorial experiment will be the same asfor the basic design employed, except that residuals-versus-factor plotsof residuals are also produced for all the factors in the experiment.

Example VII.6 Lilium experiment (continued):

Figures 3 and 9 shows the residual plots for the Lilium data considering thecomplete data set with 9 treatments and also the reduced data set with 6treatments.

The residual-versus-fitted-values, residuals-versus-Hormone, residuals-versus-Tempand normal probability plots both indicate a problem with the assumptions in bothcases.

The residual-versus-fitted-values plot is displaying strong funnel-shape so thatvariance is increasing with fitted values and this heterogeneity is reflected in theresiduals-versus-factors plots.

The normal probability plot is not displaying a straight-line trend so that the datais displaying nonnormality.

The question is would a transformation fix the problem and, if so, which one?

Page 43: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 43'

&

$

%

50 55 60 65

−20

−10

010

20

fit

res

1.0 1.5 2.0 2.5 3.0

−20

−10

010

20

as.numeric(Hormone)

res

1.0 1.5 2.0 2.5 3.0

−20

−10

010

20

as.numeric(Temp)

res

−2 −1 0 1 2

−20

−10

010

20

Normal Q−Q Plot

Theoretical Quantiles

Sam

ple Q

uant

iles

Figure 3: Lilium experiment. Residual plots considering 9 treatmentos

Page 44: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 44'

&

$

%

48 50 52 54

−10

−50

510

15

fit

res

1.0 1.2 1.4 1.6 1.8 2.0

−10

−50

510

15

as.numeric(Hormone)

res

1.0 1.5 2.0 2.5 3.0

−10

−50

510

15

as.numeric(Temp)

res

−2 −1 0 1 2

−10

−50

510

15

Normal Q−Q Plot

Theoretical Quantiles

Sam

ple Q

uant

iles

Figure 4: Lilium experiment. Residual plots considering 6 treatmentos

Page 45: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 45'

&

$

%

g) Box-Cox transformations for correcting transformablenon-additivity

Box, Hunter and Hunter (sec. 7.9) describe the Box-Cox procedure fordetermining the appropriate power transformation for a set of data. Ithas been implemented in the R function boxcox supplied in the MASSlibrary that comes with R.

When you run this procedure you obtain a plot of the log-likelihood ofλ, the power of the transformation to be used (for λ = 0 use thelogarithimic transformation). However, the function does not workwith aovlist objects and so the aov function must be repeated withoutthe Error function.

Page 46: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 46'

&

$

%

−5 −4 −3 −2 −1 0

−292

−290

−288

−286

−284

−282

−280

λ

log−L

ikelih

ood

95%

−6 −5 −4 −3 −2 −1 0

−169

−168

−167

−166

−165

−164

−163

λ

log−L

ikelih

ood

95%

Figure 5: Lilium experiment. Residual plots considering 9 and 6 treatmentos

The results here indicate that, as the log likelihood is a maximumaround λ = −4 with very large confidence interval, the transformationshould be the reciprocal of y4, what looks very strange. Maybe abetter solution will be to use a Poisson model (Days is a discretevariable).

Page 47: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 47'

&

$

%

IV.E Treatment differences

As usual the examination of treatment differences can be based onmultiple comparisons or submodels.

If all the factors are qualitative, multiple comparison procedures wouldbe performed on the appropriate tables of means.

If one or more of the factors are quantitative then submodels would beappropriate.

Page 48: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 48'

&

$

%

a) Multiple comparisons procedures

For two factor experiments, there will be altogether three tables ofmeans, namely one for each of A, B and A:B.

Which table is of interest depends on the results of the hypothesistests outlined above.

However, in all cases Tukeys HSD procedure will be employed todetermine which means are significantly different.

This can be done in R using the multicomp function.

Page 49: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 49'

&

$

%

A:B Interaction significant

In this case you look at the table of means for the A∧B combinations.

A

B 1 2 3 . . . a

1 x x x . . . x

2 x x x . . . x

. . . . . . . . . . . . . . . . . .

b x x x . . . x

w(5%) = qab,ν,α

√1rResidual MSq

Page 50: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 50'

&

$

%

There are at least two possibilities for which differences you investigateusing this table. Which you do depends on which of the following isthe researcher’s objective(s):

1. finding the levels combination(s) of the factors that maximize (orminimize) the response variable or describing the response variabledifferences between all the levels combinations of the factors – involvesexamining all possible pairs of differences between means for the levelscombinations of the two factors.

2. for each level of one factor, finding the level of the other factor thatmaximizes (or minimizes) the response variable or describing theresponse variable differences between the levels of the other factor

3. finding a level of one factor for which there is no difference betweenthe levels of the other factor

The last two involve examining the pairs of mean differences betweenthe levels of one factor for each level of the other factor, i.e. in slicesof the table for each level of the other factor.

Page 51: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 51'

&

$

%

To examine all possible pairs of differences you need to set up a singlefactor, say Treats, that has ab levels, then redo the analysis of varianceusing aov with the new factor in the model, and finally use thefunction multicomp with the focus argument set to Treats.

The nonstandard R function fac.combine, available from the DAElibrary, can be used to form the combined factor, Treat say.

It is a good idea to print out the new factor together with the originalfactors so that you can check the numbering of the combinations.

To examine pairs of mean differences between the levels of one factorfor each slice of the other factor, you will first have to identify whichfactor is to be slices - will we slice B and look at differences in A foreach slice (level) of B or slice A and examine differences in B for eachslice (level) of A?

Page 52: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 52'

&

$

%

This will depend on what is of most interest to the researcher.

However, only one of these two options should be performed, even ifthere is no clear preference on the part of the researcher.

Page 53: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 53'

&

$

%

A:B interaction not significant

In this case examine the A and B tables of means for the significantlines.

A

1 2 3 . . . a

Means x x x . . . x

w(5%) = qa,ν,α

√1rb

Residual MSq

B

1 2 3 . . . b

Means x x x . . . x

w(5%) = qb,ν,α

√1ra

Residual MSq

Page 54: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 54'

&

$

%

Example VII.6 Lilium experiment (continued):

As the Hormone and Temperature levels in this case could beconsidered qualitative a multiple comparison procedure will be used toexamine the differences between the varieties if they were significant.

Considering the 9 treatments, the interaction was significant and onSession 2 we used a Tukeys HSD procedure to compare the 9 means,even with the problem of diagnostics as an illustration.

The same type of problems ocurred with the diagnostics, whenconsidering 6 treatments only, but the Interaction was no significantand only Hormone was significant (with 1 df we can conclude that theHormone means differ). But as an illustration we use the Tukeys HSDprocedure as is shown in the program.

Page 55: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 55'

&

$

%

R program for factorial CRD Lilium data

library(dae)library(MASS)# set up data.frame with factors Plots, Treat, A, B and response variable Days# incomplete data setCRDLilium.dat <- data.frame(Plots = factor(1:48),Hormone = factor(rep(c(1:2), times=c(24,24))),Temp = factor(rep(c(rep(c(1:3), times=c(8,8,8))), times=2)))CRDLilium.dat$Days <- c(49,54,52,49,48,48,47,46,44,42,52,44,46,47,52,49,59,50,50,49,46,51,53,56,53,47,66,49,49,51,51,53,69,50,53,54,47,44,47,49,50,54,53,57,45,49,56,71)CRDLilium.dat$Treat <- fac.combine(list(CRDLilium.dat$Hormone,CRDLilium.dat$Temp))attach(CRDLilium.dat)CRDLilium.dat

## Factorialinteraction.plot(Hormone,Temp, Days, lwd = 2)interaction.plot(Temp,Hormone, Days, lwd = 2)

LiliumFac2.aov <- aov(Days ~ Hormone*Temp + Error(Plots), CRDLilium.dat)summary(LiliumFac2.aov)res <- resid.errors(LiliumFac2.aov)fit <- fitted.errors(LiliumFac2.aov)plot(fit, res, pch = 16)plot(as.numeric(Hormone), res, pch = 16)plot(as.numeric(Temp), res, pch = 16)qqnorm(res, pch = 16)qqline(res)

#Box-Cox transformationLiliumFac2.NoError.aov <- aov(Days ~ Hormone*Temp, CRDLilium.dat)boxcox(LiliumFac2.NoError.aov, lambda = seq(from = -6, to = 0, len = 20), plotit = T)

TukeyHSD(LiliumFac2.NoError.aov, "Hormone", ordered = TRUE)plot(TukeyHSD(LiliumFac2.NoError.aov, "Hormone"))

Page 56: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 56'

&

$

%

b) Polynomial submodels

As stated previously, the formal expression for maximal model for atwo-factor CRD experiment, where the two randomized factors A andB are fixed, is:

ψAB = E(Y) = XABα(γ) and var(Y) = VY = σ2UIn

where

Y is the n-random vector of random variables representing theresponse variable,

β is the ab-vector of parameters for the A-B combinations, and

σ2U is the variability arising from different units.

In respect of fitting polynomial submodels, two situations are possible:

i) one factor only is quantitative, or

ii) both factors are quantitative.

Page 57: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 57'

&

$

%

One quantitative and one qualitative factor

In investigating submodels for a two-factor factorial with one factor, Bsay, quantitative, the following set of models, in terms of a singleobservation, for the expectation is considered:

E(Yjkl) = (αβ)jk depends on combination of A and B

E(Yjkl) = αj + (αγ)j1xβk+ (αγ)j2x

2βk

quadratic response to B, differing for A

E(Yjkl) = αj + (αγ)j1xβklinear response to B, differing for A

E(Yjkl) = αj + βk nonsmooth, independent response to A & B

E(Yjkl) = αj +γ1xβk+γ2x2

βkquadratic response to B, intercept differs for A

E(Yjkl) = αj + γ1xβklinear response to B, intercept differs for A

E(Yjkl) = αj nonsmooth response, depends on A only

E(Yjkl) = βk nonsmooth response, depends on B only

E(Yjkl) = µ + γ1xβk+ γ2x2

βkquadratic response to B, A has no effect

E(Yjkl) = µ + γ1xβklinear response to B, A has no effect

E(Yjkl) = µ neither factor affects the response

Page 58: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 58'

&

$

%

where

Yjkl is the random variable representing the response variable for thel–th unit that received the j–th level of factor A and the k–th level offactor B,

µ is the overall level of the response variable in the experiment,

αj is the overall effect of the j–th level of factor A on the response,

xβkis the value of the k–th level of factor B,

γ1 and γ2 are the linear and quadratic coefficients of the equationdescribing the change in response as the level of B changes,

βk is the overall effect of the k–th level of factor B on the response,

(αγ)j1 and (αγ)j2 are the linear and quadratic coefficients of theequation describing, for the j–th level of A, the change in response asthe level of B changes,

(αβ)jk is the interaction between the j–th level of A and the k–thlevel of B.

Page 59: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 59'

&

$

%

The matrix expressions for these models are as follows:

E(Y) = XAB(αβ) depends on combination of A and B

E(Y) = XAα + XA1(αθ)1 + XA2(αθ)2 quadratic response to B,differing for A

E(Y) = XAα + XA1(αθ)1 linear response to B, differing for A

E(Y) = XAα + XBβ nonsmooth, independent response to A & B

E(Y) = XAα + X1γ1 + X2γ2 quadratic response to B, interceptdiffers for A

E(Y) = XAα + X1γ1 linear response to B, intercept differs for A

E(Y) = XAα nonsmooth response, depends on A only

E(Y) = XBβ nonsmooth response, depends on B only

E(Y) = XGµ + X1γ1 + X2γ2 quadratic response to B, A has noeffect

E(Y) = XGµ + X1γ1 linear response to B, A has no effect

E(Y) = XGµ neither factor affects the response

Page 60: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 60'

&

$

%

where

(αβ) = {(αβ)jk} is an ab–vector of effects

(αθ)1 = {(αγ)j1} is an a–vector of linear coefficients

(αθ)2 = {(αγ)j1} is an a–vector of quadratic coefficients

α = {αj} is an a–vector of effects

β = {βk} is an b–vector of effects

θ′2 = [γ1 γ2]

X1 is an n–vector containing the values of the levels of B

X2 is an n–vector containing the squared values of the levels of B

XA1 is an n× a matrix whose j–th column contains the values of thelevels of B for just those units that received the j–level of A

XA2 is an n× a matrix whose j–th column contains the squared valuesof the levels of B for just those units that received the j–level of A

Page 61: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 61'

&

$

%

The analysis of variance table for a two-factor CRD with onequantitative factor is:

Source df SSq

Units abr − 1 Y′QUYA a− 1 Y′QAYB b− 1 Y′QBY

Linear 1 Y′QBLYQuadratic 1 Y′QBQ

YDeviations b− 3 Y′QBDev

YA:B (a− 1)(b− 1) Y′QUY

A:BLinear 1 Y′QABLYA:BQuadratic 1 Y′QABQ

YDeviations (a− 1)(b− 3) Y′QABDev

YResidual ab(r − 1) Y′QURes

Y

Page 62: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 62'

&

$

%

Step 3: Decide between hypotheses

For Deviations: Only if the terms to which a term is marginal are not significantthen, if P(F ≥ F0) = p ≤ α, the evidence suggests that the null hypothesis berejected and the term must be incorporated in the model. Deviations for B ismarginal to Deviations for A:B so that if the latter is significant, the Deviations forB is not tested; indeed no further testing occurs as the maximal model has to beused to describe the data.

For A:BLinear and A:BQuadratic: Only if the polynomial terms are not of lower

degree than a significant polynomial term then, if P(F ≥ F0) = p ≤ α, theevidence suggests that the null hypothesis be rejected and the term be incorporatedin the model. A:BLinear is of lower degree than A:BQuadratic so that if the latter

is significant, A:BLinear is not tested.

For A, Linear for B, Quadratic for B: Only if the terms to which a term is marginaland the polynomial terms are not of lower degree than a significant polynomialterm then, if P(F ≥ F0) = p ≤ α, the evidence suggests that the null hypothesisbe rejected and the term be incorporated in the model. For example, for the Linearterm for B, it is of lower degree than the Quadratic term for B and it is marginal toA:BLinear so that if either of these is significant, Linear for B is not tested.

Page 63: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 63'

&

$

%

Both factors quantitative: The analysis of variance table for atwo-factor CRD with both factors quantitative is:

Source df SSqUnits abr − 1 Y′QUY

A a− 1 Y′QAYLinear 1 Y′QAL

YQuadratic 1 Y′QAQYDeviations a− 3 Y′QADevY

B b− 1 Y′QBYLinear 1 Y′QBL

YQuadratic 1 Y′QBQYDeviations b− 3 Y′QBDevY

A:B (a− 1)(b− 1) Y′QUYALinear:BLinear 1 Y′QALBL

YALinear:BQuadratic 1 Y′QALBQ

YAQuadratic:BLinear 1 Y′QAQBL

YAQuadratic:BQuadratic 1 Y′QAQBQ

YDeviations (a− 1)(b− 1)− 4 Y′QABDevY

Residual ab(r − 1) Y′QUResY

Page 64: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 64'

&

$

%

Step 3: Decide between hypotheses

For Deviations: Only if the terms to which a term is marginal are notsignificant then, if P(F ≥ F0) = p ≤ α, the evidence suggests that thenull hypothesis should be rejected and the term must be incorporatedin the model. Deviations for A and B are marginal to Deviations forA:B so that if the latter is significant, neither the Deviations for A norfor B is tested; indeed no further testing occurs as the maximal modelhas to be used to describe the data.

For all Linear and Quadratic terms: Only if the polynomial termsare not of lower degree than a significant polynomial term and theterms to which the term is marginal are not significant then, ifP(F ≥ F0) = p ≤ α, the evidence suggests that the null hypothesisshould be rejected; the term and all polynomial terms of lower degreemust be incorporated in the model. For example, ALinear:BLinear ismarginal to A:B and is of lower degree than all other polynomialinteraction terms and so is not tested if any of them is significant.

Page 65: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 65'

&

$

%

Example VII.2 Coffee factorial RCBD experiment The followingdata are from an RCBD experiment with 6 blocks and 8 treatmentsresulting from a combination of 4 levels of N (0, 30, 60 and 90 kg/haof N) and 2 levels of K (0 and 60 kg/ha of K2O). The responsevariable was yield of coffee grains (kg/plot of 105m2).

Blocks Treat

Treatments I II III IV V VI Totals

N0K0 31.8 40.5 35.7 25.7 37.2 45.3 216.2

N0K1 25.6 32.4 39.6 48.9 30.6 33.7 210.8

N1K0 36.2 37.8 40.9 44.8 42.4 38.4 240.5

N1K1 37.1 53.0 36.4 43.0 29.7 30.4 229.6

N2K0 35.3 39.0 36.0 35.5 28.2 42.4 216.4

N2K1 51.5 66.1 51.7 52.0 56.5 58.2 336.0

N3K0 43.8 37.7 43.3 41.8 31.9 37.7 236.2

N3K1 47.0 49.9 50.9 49.1 51.7 39.6 288.2

Block Totals 308.3 356.4 334.5 340.8 308.2 325.7 1973.9

Page 66: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 66'

&

$

%

1 2 3 4 5 6

30

40

50

60

Blocks

Yie

lds

0.0 30.0 60.0 90.0 0.60 30.60 60.60 90.603

04

05

06

0

Treatments

Yie

lds

Figure 6: Coffee RCBD. Boxplots

Page 67: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 67'

&

$

%

Example VII.2 Coffee factorial RCBD experiment (continued):

Mean Variance StandardError1 36.03333 46.39867 6.8116572 35.13333 66.08667 8.1293713 40.08333 10.28167 3.2065044 38.26667 75.91867 8.7131325 36.06667 22.30267 4.7225706 56.00000 32.36800 5.6892887 39.36667 20.47067 4.5244528 48.03333 19.69467 4.437867

The differences between the treatment variances are not too large.

s2max

s2min

=75.9210.28

= 7.4

Page 68: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 68'

&

$

%

3540

4550

55

N

mea

n of

Yie

lds

0 30 60 90

K

600

3540

4550

55

K

mea

n of

Yie

lds

0 60

N

6090300

Figure 7: Coffee RCBD. Interaction plots

It is clear that there is interaction between N and K

Page 69: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 69'

&

$

%

Step 2: ANOVA table using R

Source df SSq MSq F ProbBlocks 5 224.03 44.81Plots[Blocks]

N 3 782.82 260.94 7.34 0.0006 ***N: L 1 584.38 584.38 16.45 0.0003 ***N: Q 1 105.32 105.32 2.96 0.0939 .N: Dev 1 584.38 584.38 16.45 0.0003 ***

K 1 502.46 502.46 14.14 0.0006 ***K: L 1 502.46 502.46 14.14 0.0006204 ***

N:K 3 927.22 309.07 8.70 0.000 ***N:K: L.L 1 381.78 381.78 10.74 0.0024 **N:K: Q.L 1 80.34 80.34 2.26 0.1416N:K: Dev.L 1 465.10 465.10 13.09 0.0009 ***

Residuals 35 1243.57 35.53Total 47

Exercise Do the nonadditivity test and the graphics with the fittedcurves.

Page 70: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 70'

&

$

%

R program for a RCBD factorial coffee data

library(dae)

#set up data.frame with factors Plots, Blocks and Doses and response variable Yields

RCBDFac2Coffee.dat <- data.frame(Blocks=factor(rep(c(1:6), each=8)),

Plots = factor(rep(c(1:8), times=6)), Treatments = factor(rep(c(1:8), times=6)),

N = factor(rep(rep(c(0,30,60,90), each=2), times=6)),K = factor(rep(c(0,60), times=24)))

RCBDFac2Coffee.dat$Yields <- c(

31.8,25.6, 36.2,37.1, 35.3,51.5, 43.8,47.0,

40.5,32.4, 37.8,53.0, 39.0,66.1, 37.7,49.9,

35.7,39.6, 40.9,36.4, 36.0,51.7, 43.3,50.9,

25.7,48.9, 44.8,43.0, 35.5,52.0, 41.8,49.1,

37.2,30.6, 42.4,29.7, 28.2,56.5, 31.9,51.7,

45.3,33.7, 38.4,30.4, 42.4,58.2, 37.7,39.6)

RCBDFac2Coffee.dat

attach(RCBDFac2Coffee.dat)

# boxplots

par(mfrow=c(1,2))

boxplot(split(Yields, Blocks), style.bxp = "old", xlab = "Blocks", ylab

= "Yields", medchar = T, medpch = 8)

boxplot(Yields~N*K, style.bxp = "old", xlab="Treatments", ylab="Yields", medchar = T, medpch = 8)

par(mfrow=c(1,1))

# Treatments means, variances and standard erros

v <- tapply(Yields, Treatments,var)

data.frame(Mean= tapply(Yields, Treatments,mean),Variance=v,StandardError= sqrt(v))

rm(v)

interaction.plot(N, K, Yields, lwd = 2)

interaction.plot(K, N, Yields, lwd = 2)

N.lev <- c(0,30,60,90)

contrasts(RCBDFac2Coffee.dat$N) <- contr.poly(N.lev)

Page 71: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 71'

&

$

%

K.lev <- c(0,60)

contrasts(RCBDFac2Coffee.dat$K) <- contr.poly(K.lev)

RCBDFac2Coffee.aov <- aov(Yields ~ Blocks+N*K + Error(Blocks/Plots), RCBDFac2Coffee.dat)

summary(RCBDFac2Coffee.aov, split = list(N = list(L = 1, Q = 2, Dev = 1),

K = list(L = 1)))

detach(RCBDFac2Coffee.dat)

search()

Page 72: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 72'

&

$

%

VII.H Summary

In this chapter we have:

• described how to design factorial experiments using a completelyrandomized, a randomized complete block or a Latin squaredesign;;

• emphasized the advantage of factorial experiments overone-factor-at-a time experiments;

• formulated alternative linear expectation models using indicatorvariables to describe the results from a factorial experiment; giventhe estimators of the fitted values as functions of M or meanoperator matrices;

• outlined an ANOVA hypothesis test for choosing betweenexpectation models;

– the partition of the total sums of squares was given with thesums of squares expressed as the sums of squares of theelements of vectors and as quadratic forms where the matricesof the quadratic forms, Q matrices, are symmetric

Page 73: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 73'

&

$

%

idempotents;

– the expected mean squares under the alternative expectationmodels are used to justify the choice of F test statistic;

– the order in which hypotheses should be tested was describedand it was mentioned that in some cases not all hypotheseswill be tested;

• shown how to obtain a layout and the analysis of variance in

• discussed procedures for checking the adequacy of the proposedmodels; demonstrated how to choose a Box-Cox transformationwhen the model is inadequate;

• subsequent to the hypothesis test, examined treatment differencesin detail; in particular, outlined the fitting of submodels for thetwo cases of a) one factor quantitative and the other qualitativeand b) both factors quantitative;

Page 74: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 74'

&

$

%

– discussed the differences between the analyses where Rows andColumns are fixed and where they are random;

– the expected mean squares under the alternative expectationmodels are used to justify the choice of F test statistic;

• shown how to obtain a layout and the analysis of variance in R;

• discussed procedures for checking the adequacy of the proposedmodels;

• subsequent to the hypothesis test, examined treatment differencesin detail;

Page 75: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 75'

&

$

%

Exercise – Grass yield The following data are from a CRDexperiment with 4 replicates and 2 factors, Irrigation (A1 – withirrigation, A2 – without irrigation) and fertizing method (B1 –chemical fertilizing, B2 – organic fertilizing).

The response variable was yield (kg/ha) of dry matter of “elefante”grass (Pennisetum purpureum: Schum.) cv “Cameroon”.

Replicates

Irrigation Fertilizing 1 2 3 4 Totals

With Organic 32.70 30.50 31.55 28.00 122.75

Chemical 28.40 28.50 25.86 29.68 112.44

Without Organic 18.05 18.10 20.72 19.80 76.67

Chemical 18.13 21.00 19.50 20.50 79.13

Total 390.99

Page 76: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 76'

&

$

%

IX. Split-plot experiments

IX.A Design of split-plot experiments

IX.B The standard split-plot experiment

a) Designing a standard split-plot experiment

b) Determining the analysis of variance table

c) Analysis of an example

d) Treatment differences for the standard split-plot

IX.E Summary

IX.F Exercises

Page 77: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 77'

&

$

%

IX.A Design of split-plot experiments

Definition IX.1: The standard split-plot design is one in which twofactors, say A and B with a and b levels, respectively are assigned asfollows: one of the factors, A say, is randomized according to a RCBDwith say r blocks and each of its ra plots, called the main plots, issplit into b subplots (or split-plots) and the levels of B randomizedindependently in each subplot. Altogether the experiment involvesn = rab subplots.

That is, the generic factor names for this design are Blocks,MainPlots, SubPlots, A and B.

The split-plot principle is very flexible and can be used to generate alarge number of different types of experiments.

Page 78: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 78'

&

$

%

For example, the main plots could be arranged in any of a CRD,RCBD, Latin square, BIBD, Youden Square and each plot of theparticular design used then subdivided into subplots.

The subplots may utilize more complicated designs as well. Forexample, the main plots may be arranged in a RCBD each of whichare subdivided in such a way as to allow a Latin Square to be placed ineach main plot.

Also, subplots can be split into subsubplots and subsubplots into ...Nor is one restricted to applying just one factor to each type of unit.More than one factor can be randomized to main plots, more than oneto subplots and so on.

The standard split-plot design is nearly the simplest possibility; only aCRD in the main plots would be simpler.

Page 79: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 79'

&

$

%

The split-plot design is useful in the following situations:

1. When the physical attributes of a factor require the use of largerunits of experimental material than other factors.

For example, land preparation treatments usually require to beperformed on larger areas of land than do the sowing of differentvarieties (due to the different pieces of equipment).

Temperature control for say storage purposes involves the use ofrelatively large chambers in which several samples can usually bestored.

Different processing runs are often of a minimum size such that theirproduce can be readily subdivided for the application of furthertreatments.

Also, some factors are relatively hard to change. For example, thetemperature of a production operation is often difficult to change sothat it might be better to change it less often by making it a main-plotfactor.

Page 80: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 80'

&

$

%

2. When it is desired to incorporate an additional factor into anexperiment.

When an experiment, such as an agricultural experiment is run over aperiod of time, it sometimes occurs after the trial has been set up thatit would be advantageous to incorporate an additional factor. This canbe achieved by splitting the existing plots into enough subplots so thatthe levels of the new factor(s) can be randomized to the subplots ineach subplot.

3. When it is expected that the differences amongst the levels ofcertain factors are larger than amongst those of other factors.

The levels of the factors with larger differences are randomized tomain plots. One effect of this may be to increase the precision ofcomparisons between the levels of the other factors.

Page 81: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 81'

&

$

%

4. When it is desired to ensure greater precision between some factorsthan others.

Irrespective of the size of the differences between the main plottreatment factors, it is desired to increase the precision of some factorsby assigning them to subplots.

On the other hand, it may be that one is less interested in the maineffects of some factors, in which case these factors should be assignedto main plots.

A particular example of such factors is ”noise” factors which are oftenincluded in production experiments to ensure the product works undera range of conditions; one is usually more interested in productdifferences and the interaction of products and the ”noise” factors.

Page 82: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 82'

&

$

%

Note that the last two of these situations are utilising the anticipatedgreater variability of main plots relative to subplots.

That is, we are expecting the larger units to be more variable than thesmaller units.

This will be expressed in the variation model for these experiments,and hence in the expected mean squares.

In describing the type of study, you need to identify the main plot andsubplot design.

Page 83: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 83'

&

$

%

IX.B The standard split-plot experiment

a) Designing a standard split-plot experiment

In the standard split-plot, the main-plot treatment factor, A, israndomized to main plots and the subplot treatment factor, B, israndomized to subplots.

Example IX.1 Production rate experiment

Suppose that one is interested in comparing 3 methods of workorganization and 3 sources of raw material on the production rate of acertain product.

It is decided that four factories are to be used in the experiment andthat each factory is to be divided into three areas.

The methods of work organization are to be assigned at random toareas.

Each area is to be subdivided into 3 parts and the source of rawmaterial for each part is obtained by randomizing the three sources tothe three parts.

Page 84: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 84'

&

$

%

R program for a layout for RCBD Production data

library(dae)

#

# standard split-plot

#

# set up treatment factors

#

r <- 4

a <- 3

b <- 3

fnames <- list(Sources = c("A","B","C"), Methods = c(1:a))

SPLProd.Treats <- fac.gen(levels = c(b,a), factor.names = fnames,

replications = r, order="yates")

#

# randomize

#

set.seed(1025)

n <- r*a*b

Standard.Order <- factor(1:n)

Random.Order <- order(rep(runif(r), each=a*b),

rep(runif(r*a), each=b),

runif(n))

SPLProd.Design <- fac.divide(Random.Order,

factor.names=list(Factories=r, Areas=c("I","II","III"), Parts=b))

SPLProd.Design <- data.frame(Standard.Order, Random.Order, SPLProd.Design, SPLProd.Treats)

remove("Standard.Order", "Random.Order", "SPLProd.Treats")

SPLProd.Design[SPLProd.Design$"Random.Order",] <- SPLProd.Design

SPLProd.Design

SpLProd <- SPLProd.Design

Page 85: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 85'

&

$

%

The analysis of variance table for this experiment has the followingform:

Source df SSq E(MSq)Factories 3 Y′QF Y σ2

FAP + 3σ2FA + qF (ψ)

Areas[Factories] 8 Y′QFAYMethods 2 Y′QMY σ2

FAP + 3σ2FA + qM (ψ)

Residual 6 Y′QFAResY σ2

FAP + 3σ2FA

Parts[Areas∧Factories] 24 Y′QFAP YSources 2 Y′QSY σ2

FAP + qS(ψ)Methods:Sources 4 Y′QMSY σ2

FAP + qMS(ψ)Residual 18 Y′QFAPRes

Y σ2FAP

Total 35

Page 86: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 86'

&

$

%

The design chosen has resulted in the differences between methods oforganization being confounded with areas differences whereasdifferences between sources of raw material are confounded with parts(the areas do not differ in source of raw material).

This has been achieved by splitting the main plots (areas in this case)into subplots (parts in this case). This is evident from the ANOVAtable.

Now it is likely that Areas will be more variable than parts of an areaso that differences between Methods may well be estimated with lessprecision than Source differences.

Page 87: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 87'

&

$

%

c) Analysis of an example

Example – Sugarcane experiment 2 The following data are from a RCBDexperiment with 8 blocks and 3 treatments. The treatments were control and twotypes of product to induce maturation in sugarcane. From each plot were collectedsamples of cane at 0, 2, 4, 6, 8 and 10 weeks after the application of the products.The response variable was % of brix on the sugarcane juice.

BlocksTratamentos Weeks I II III IV V VI VII VIII Totals

0 17.70 17.50 17.95 17.90 17.30 17.60 17.40 17.75 141.102 16.95 18.60 17.05 18.00 19.40 18.55 17.80 18.05 144.40

A 4 18.95 18.10 17.60 18.35 19.20 18.90 18.25 18.70 148.05Control 6 18.65 18.50 19.65 18.30 20.10 18.75 19.25 17.40 150.60

8 19.70 20.20 19.70 19.70 20.55 20.25 19.80 18.70 158.6010 20.75 19.00 19.85 20.80 19.45 21.70 19.10 18.25 158.90

Sub-totals 112.70 111.90 111.80 113.05 116.00 115.75 111.60 108.85 901.65

0 16.83 16.96 17.25 18.22 17.75 16.90 16.70 17.19 137.802 17.70 17.56 18.17 17.72 19.48 18.20 18.58 18.14 145.55

B 4 18.00 18.05 18.55 19.52 20.70 18.85 18.41 19.20 151.28Polaris 6 18.68 18.83 17.65 20.40 20.03 19.63 18.70 19.71 153.63

8 19.55 19.38 18.10 20.85 20.80 20.42 19.33 21.10 159.5310 15.56 17.18 19.00 19.40 20.45 19.92 20.00 19.65 151.16

Sub-totals 106.32 107.96 108.72 116.11 119.21 113.92 111.72 114.99 898.95

0 16.63 17.70 17.52 17.52 17.26 17.18 17.43 16.52 137.762 17.18 17.75 17.65 17.55 18.61 18.26 18.00 16.56 141.56

C 4 18.05 18.20 18.57 19.57 19.03 18.91 18.48 17.73 148.54Ethrel 6 18.50 19.53 19.08 19.03 19.48 18.95 18.77 16.54 149.88

8 20.65 20.90 18.68 18.55 20.28 20.25 19.27 15.60 154.1810 19.90 23.96 19.08 19.03 20.62 20.33 20.06 18.85 161.83

Sub-totais 110.91 118.04 110.58 111.25 115.28 113.88 112.01 101.80 893.75

Totals 329.93 337.90 331.10 340.41 350.49 343.55 335.33 325.64 2694.35

Page 88: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 88'

&

$

%

17.5

18.0

18.5

19.0

19.5

20.0

Products

mea

n of

Brix

A B C

Weeks

1086420

17.5

18.0

18.5

19.0

19.5

20.0

Weeks

mea

n of

Brix

0 2 4 6 8 10

Products

CAB

Figure 8: Coffee RCBD. Interaction plots

It is clear that there is interaction between Products and Weeks

Page 89: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 89'

&

$

%

Step 2: ANOVA table using R

Source df SSq MSq F ProbBlocks 7 25.2008 3.6001Plots[Blocks] 16

Products 2 0.6718 0.3359 0.15 0.8595Residual 14 30.7295 2.1950

SubPlots[Blocks∧Plots] 120Weeks 5 101.936 20.387 34.16 2e-16 ***Products:Weeks 10 12.689 1.269 2.126 0.02851 *Residual 105 62.671 0.597

Total 143

Step 3: Decide between hypotheses

The interaction is significant. The interest of the researcher in thiscase is to look at the trend along the time for three Products.

Page 90: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 90'

&

$

%

17 18 19 20 21

−2−1

01

2

fit

res

1.0 1.5 2.0 2.5 3.0

−2−1

01

2

as.numeric(Products)

res

1 2 3 4 5 6

−2−1

01

2

as.numeric(Weeks)

res

−2 −1 0 1 2

−2−1

01

2

Normal Q−Q Plot

Theoretical Quantiles

Sam

ple Q

uant

iles

Figure 9: Sugarcane experiment 2. Residual plots

The residual plotas appear to be satisfactory.

Page 91: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 91'

&

$

%

d) Treatment differences for the standard split-plot

As for other experiments treatment differences are investigated usingmultiple comparisons or polynomial submodels.

Of these, only multiple comparisons is different to the ordinaryfactorial experiment and we investigate its use in the next section.

Multiple comparisons

As usual we base the multiple comparisons on Tukeys HSD which, asusual, is given by HSD = q/

√2s.e.d.. However, their calculation is

slightly more complicated for split-plot experiments because thestandard errors for the difference vary.

The formulae for the standard errors of difference for a split-plotdesign in which one factor (A) is randomized to whole-plots andanother (B) to subplots (as in the example) are:

Page 92: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 92'

&

$

%

Table of means s.e.d.

Two overall A means

√2s2

MResrb

where rb is the no. of

(e.g. Variety means) replications in an A mean

Two overall B means

√2s2

SResra

where ra is the no. of

(e.g. Fertilizer means) replications in a B meanTwo interaction means

– at the same level of A

√2s2

SResr

where r is the no. of

replications in an A∧B mean

– not at the same level of A

√2[(b−1)s2

SRes+s2

MRes]

rb

Note: s2MRes

and s2SRes

are the Main-plot and Split-plot Residual MSqs,

respectively, with νSMResand νSRes

, from the ANOVA table. For the last casethe number of df to obtain q is given by

[(b− 1)s2SRes

+ s2MRes

]2

[(b−1)s2SRes

]2

νSRes+

[s2MRes

]2

νMRes

(Sattertwaite, 1946)

In terms of using R, this is not implemented. What we can do is use model.tablesto produce the tables of means and s.e.d.s and then do the rest manually.

Page 93: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 93'

&

$

%

Fitting polynomials to Sugarcane data

0 2 4 6 8 10

1618

2022

24

Weeks

Brix

*

*

**

*

*

+

++

+

+

+

−−

*

**

*

*

*

+

++

+

+

+

− −−

*

*

*

* * *

+

++

++

+

− −

−−

* ** *

*

*

++

+

++

+

− −

−−

*

* *

**

*

+

+

+

+

++

−−

−−

*

** *

*

*

+

+

+

+

++

− −

− −

**

*

*

*

*

+

+ ++

+

+

−−

−−

**

*

*

**

+

+

+

+

+

+

− −

0 2 4 6 8 10

1618

2022

24Weeks

Brix

**

**

* *

+

+

++

+

+

−−

− −

Figure 10: Sugarcane spliplot RCBD – Fitted curves and observed (first plot) andmeans of the blocks (second plot)

Page 94: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 94'

&

$

%

R program for a RCBD split-plot sugarcane data

library(dae)

# set up data.frame with factors Blocks,Plots,Subplots,# Treats, Weeks and response variable BrixRCBDSPSugar.dat <- data.frame(Blocks = factor(rep(c(1:8), each=18)),Plots = factor(rep(rep(c(1:3), each=6),times=8)),SubPlots = factor(rep(c(1:6), times=24)),Products = factor(rep(rep(c("A","B","C"), each=6),times=8)),Weeks = factor(rep(c(0,2,4,6,8,10),times=24)))RCBDSPSugar.dat$Brix<-c(17.70,16.95,18.95,18.65,19.70,20.75,16.83,17.70,18.00,18.68,19.55,15.56,16.63,17.18,18.05,18.50,20.65,19.90,17.50,18.60,18.10,18.50,20.20,19.00,16.96,17.56,18.05,18.83,19.38,17.18,17.70,17.75,18.20,19.53,20.90,23.96,17.95,17.05,17.60,19.65,19.70,19.85,17.25,18.17,18.55,17.65,18.10,19.00,17.52,17.65,18.57,19.08,18.68,19.08,17.90,18.00,18.35,18.30,19.70,20.80,18.22,17.72,19.52,20.40,20.85,19.40,17.52,17.55,19.57,19.03,18.55,19.03,17.30,19.40,19.20,20.10,20.55,19.45,17.75,19.48,20.70,20.03,20.80,20.45,17.26,18.61,19.03,19.48,20.28,20.62,17.60,18.55,18.90,18.75,20.25,21.70,16.90,18.20,18.85,19.63,20.42,19.92,17.18,18.26,18.91,18.95,20.25,20.33,17.40,17.80,18.25,19.25,19.80,19.10,16.70,18.58,18.41,18.70,19.33,20.00,17.43,18.00,18.48,18.77,19.27,20.06,17.75,18.05,18.70,17.40,18.70,18.25,17.19,18.14,19.20,19.71,21.10,19.65,16.52,16.56,17.73,16.54,15.60,18.85)

attach(RCBDSPSugar.dat)RCBDSPSugar.dat

interaction.plot(Products, Weeks, Brix, lwd = 2)interaction.plot(Weeks, Products, Brix, lwd = 2)

RCBDSPSugar.aov <- aov(Brix ~ Blocks+Products*Weeks + Error(Blocks/Plots/SubPlots), RCBDSPSugar.dat)

Page 95: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 95'

&

$

%

summary(RCBDSPSugar.aov)res <- resid.errors(RCBDSPSugar.aov)fit <- fitted.errors(RCBDSPSugar.aov)plot(fit, res, pch = 16)plot(as.numeric(Products), res, pch = 16)plot(as.numeric(Weeks), res, pch = 16)qqnorm(res, pch = 16)qqline(res)

model.tables(RCBDSPSugar.aov, type="means", se=T)

Weeks.lev <- seq(0, 10, 2)contrasts(RCBDSPSugar.dat$Weeks) <- contr.poly(Weeks.lev)contrasts(RCBDSPSugar.dat$Weeks)RCBDSPSugar.aov <- aov(Brix ~ Blocks+Products*Weeks +

Error(Blocks/Plots/SubPlots), RCBDSPSugar.dat)summary(RCBDSPSugar.aov, split = list(Weeks = list(L = 1, Q = 2, Devn=3:5)))

#### to be done# ploting the observed values and fitted curveplot(c(0,10), c(15,25), type="n", xlab="Weeks", ylab="Brix")w<- (as.numeric(Weeks)-1)*2points(w,Brix, pch=rep(rep(c("*","+","-"), each=6),times=8),col=rep(rep(c("green","blue","red"), each=6),times=8))x<-seq(0,10,0.1)

lines(x, predict(lm(Brix ~ Products*poly(w,2)),data.frame(w=x,Products=factor(rep("A",length(x)), levels=levels(Products))),type="response"),col="green")

lines(x, predict(lm(Brix ~ Products*poly(w,2)),data.frame(w=x,Products=factor(rep("B",length(x)), levels=levels(Products))),type="response"), col="blue")

lines(x, predict(lm(Brix ~ Products*poly(w,2)),data.frame(w=x,Products=factor(rep("C",length(x)), levels=levels(Products))),type="response"),col="red")

#Using the observed meansTreat <- fac.combine(list(RCBDSPSugar.dat$Products,RCBDSPSugar.dat$Weeks))Treat.mean<-tapply(Brix, Treat,mean)

Page 96: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 96'

&

$

%

plot(c(0,10), c(15,25), type="n", xlab="Weeks", ylab="Brix")

w<- (as.numeric(Weeks)-1)*2

points(c(Weeks.lev,Weeks.lev,Weeks.lev),Treat.mean, pch=rep(rep(c("*","+","-"), each=6),times=8),

col=rep(rep(c("green","blue","red"), each=6),times=8))

x<-seq(0,10,0.1)

lines(x, predict(lm(Brix ~ Products*poly(w,2)),data.frame(w=x,

Products=factor(rep("A",length(x)), levels=levels(Products))),type="response"),col="green")

lines(x, predict(lm(Brix ~ Products*poly(w,2)),data.frame(w=x,

Products=factor(rep("B",length(x)), levels=levels(Products))),type="response"), col="blue")

lines(x, predict(lm(Brix ~ Products*poly(w,2)),data.frame(w=x,

Products=factor(rep("C",length(x)), levels=levels(Products))),type="response"),col="red")

detach(RCBDSPSugar.dat)

search()

Page 97: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 97'

&

$

%

Exercise – Sugarcane 3 The following data from Barbin (2003) arefrom a CRD experiment 2 methods of planting (A – simple groove, B– double groove) sugarcane (variety CB-43-5).

The response variable was production (t/ha) measured in the first andsecond years (split-plots).

Methods Year 1 Year 2 Totals

92.9 84.5 177.4128.6 86.7 215.3121.7 84.5 206.2122.8 77.0 199.8

A 118.1 88.1 206.2115.7 82.4 198.1121.4 84.0 205.4126.9 88.8 215.7118.1 85.7 203.8122.4 78.8 201.2

Sub-Totals 1188.6 840.5 2029.1

122.5 84.5 207.0110.0 85.0 195.0115.0 85.5 200.5125.0 88.0 213.0

B 105.0 86.7 191.7110.0 80.7 190.7115.0 88.3 203.3105.0 89.3 194.3108.5 94.3 202.8118.3 90.0 208.3

Sub-Totals 1134.3 872.3 2006.6

Page 98: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 98'

&

$

%

Topics not covered in this course

• Incomplete Blocks Designs

• Youden squares

• Lattice Designs

• Confounding in Factorial designs

• Fractional Factorial Designs

• Strip-plots Designs

• Series of Experiments

• Cross-over Designs

• Response Surface Designs

Page 99: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 99'

&

$

%

References

Box, G.E.P., Hunter, W.G. and Hunter, J.S. (1978) Statistics forexperimenters. Wiley, New York.

Cochran, W.G. and Cox, G.M. (1957) Experimental designs. 2ndedn. Wiley, New York.

Dagnelie, P. (2003) Principes d’experimentation.Pressesagronomiques de Gembloux, Gembloux

Graybill, F.A. (1976) Theory and application of the linear model.Duxbury, Massachusetts.

Harville, D.A. (1997) Matrix algebra from a statistician’s perspective.Springer, New York.

Hocking, R.R. (1996) Methods and applications of linear models.Wiley, New York.

Kuehl R.O. (2000). Design of experiments: statistical principles ofresearch design and analysis. Pacific Grove, Brooks/Cole, 666 p.

Mead, R. (1990) The design of experiments. Cambridge University

Page 100: Topics in Biometry Factorial and Split-plot experiments · Example VII.1 Fertilizing oranges Suppose an experimenter is interested in investigating the efiect of nitrogen and phosphorus

Topics in Biometry Course: Session 5 100'

&

$

%

Press, Cambridge.

Montgomery, D.C. (1997) Introduction to statistical quality control.3rd edn. Wiley, New York.

Montgomery, D.C. (2001) Design and analysis of experiments. 5thedn. Wiley, New York.

Myers, R.H., and Milton, J.S. (1991) A first course in the theory oflinear statistical models. PWS-Kent, Boston.

Petersen R.G. (1994). Agricultural field experiments: design andanalysis. New York, Dekker, 409 p.

Venables, W.N. and Ripley, B.D. (1994) Modern applied statisticswith S-Plus. Springer-Verlag, New York.

Weber, D.C. and Skillings, J.H. (2000) A First Course in the Designof Experiments: A Linear Models Approach. CRC Press, BocaRaton, Florida.