Chapter 21: Randomized Complete Block Designs Lecture 13 April 5, 2006

advertisement
Chapter 21: Randomized Complete Block
Designs
Lecture 13
April 5, 2006
Psych 791
Slide 1 of 32
Today’s Class
Overview
■
Blocking.
■
Randomized Complete Block Designs.
■
Our example today will be from SAS:
http://v8doc.sas.com/sashtml/stat/chap17/sect4.htm.
● Today’s Class
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 2 of 32
Blocking
Slide 3 of 32
What is Blocking?
■
The idea of blocking for a variable is to control the levels of a
factor that are not normally controlled.
■
This blocking variable will reduce the amount of experimental
error variance in the model.
■
It will also increase the validity of your results.
■
For example, if you have a design where one of the factor is
gender and do not block for gender. If the experimental
groups do not have an equal number of males and females
in them, how do you know if the differences are due to the
treatment or to gender?
■
The answer is, you don’t, so block!!!
Overview
Blocking
● What is Blocking?
● Designing a Study
● Blocking Criteria
● Design, continued
● Advantages to Blocking
● Disadvantages to Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 4 of 32
Designing a Study
■
This chapter deals with a specific design called a
Randomized Complete Block Design.
■
Breaking this down:
Overview
Blocking
● What is Blocking?
● Designing a Study
● Blocking Criteria
◆
Block - There is a blocking variable.
◆
Complete - Every experimental condition is contained
within each blocking level.
◆
Randomized - Subjects are randomly assigned to an
experimental condition (within block).
● Design, continued
● Advantages to Blocking
● Disadvantages to Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
■
Let us suppose that gender is our blocking variable, we
determine our experimental conditions, and then as we
collect our subjects (an equal amount from each gender), we
randomly assign them to a treatment group.
More Than One Treatment
Design Matrix
Wrapping Up
Slide 5 of 32
Blocking Criteria
■
The purpose of blocking is to sort subjects in groups where
each are homogenous with respect to the response variable
to make the differences between the groups as great as
possible.
■
These are things that are not usually controlled but which
you think may have an effect on the outcome variable.
■
There are two types of criteria for which to block:
Overview
Blocking
● What is Blocking?
● Designing a Study
● Blocking Criteria
● Design, continued
● Advantages to Blocking
● Disadvantages to Blocking
Model
Fitting the Model
ANOVA Table
◆
Characteristics of Subjects: For persons: age, income,
intelligence, education, attitudes, etc; For something like
region of the country: population, average income, etc.
◆
Characteristics of the Experiment: observer, time of
processing, machine, measuring instrument, batch, etc.
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 6 of 32
Design, continued
■
The design of a blocking criteria really takes some
pre-thought.
■
It means that in advance, you think that some variable might
have an effect on the outcome response.
■
Usually, it can be drawn from past research.
■
If something was shown to effect the response variable, you
can block for it, in a sense control for that variable, to be sure
that your experimental factor is really effecting your
response.
Overview
Blocking
● What is Blocking?
● Designing a Study
● Blocking Criteria
● Design, continued
● Advantages to Blocking
● Disadvantages to Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 7 of 32
Advantages to Blocking
Overview
■
It can provide more precise results.
■
It can accommodate any number of treatments or
replications.
■
Do not need equal sample size of treatment level factors.
■
Analysis is simple (really same as in previous chapters).
■
If a particular level of the blocking variable needs to be
dropped, it does not ruin the results.
■
Can deliberately induce variability by altering the levels of
the blocking variable.
Blocking
● What is Blocking?
● Designing a Study
● Blocking Criteria
● Design, continued
● Advantages to Blocking
● Disadvantages to Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 8 of 32
Disadvantages to Blocking
■
If missing observations in a block, analysis becomes
complicated.
■
Degrees of freedom for model are reduced because you lose
some for the blocking variable.
■
More assumptions...
■
Difficult to make inferences about blocking variable.
Overview
Blocking
● What is Blocking?
● Designing a Study
● Blocking Criteria
● Design, continued
● Advantages to Blocking
● Disadvantages to Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 9 of 32
Model for RCBD
■
This is the model, should look fairly similar
Overview
Yij = µ·· + ρi + τj + εij
Blocking
Model
● Model for RCBD
■
Where:
■
µ·· is a constant
● Model Notes
Fitting the Model
ANOVA Table
F-test
■
ρi constant for the block (row) effects with
ρi = 0
P
τj constant for treatment effects with τj = 0
■
εij independent N (0, σ 2
■
Model Fit
Post-Hoc
P
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 10 of 32
Model Notes
■
As you can see, this model is the same as we used for the
two-factor design with no interaction term.
■
The only thing that changed is our greek letters, so don’t be
fooled by the name differences.
■
We will NEVER fit a model with an interaction between a
blocking variable and another variable.
■
The blocking effect is an essence a way to control the error
variance.
■
So, we take out the piece of the error variance associated
with the variable so we can concentrate on the effect of the
treatment.
Overview
Blocking
Model
● Model for RCBD
● Model Notes
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 11 of 32
Fitting the Model
■
Fitting the model is done in the same way as we did for the
last chapter without the interaction term.
■
We define our parameters in terms of our µs, then we
substitute in our Ȳ .
■
Our parameters are:
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
µ·· = Ȳ··
Post-Hoc
More Than One Block
More Than One Replication in
ρi = Ȳi· − Ȳ··
Block
More Than One Treatment
Design Matrix
τj = Ȳ·j − Ȳ··
Wrapping Up
Slide 12 of 32
ANOVA table
■
The ANOVA table won’t look any different in terms of the
sources of variation and our degrees of freedom.
■
We partition out our SSTO (total sums of squares) into these
parts:
Overview
Blocking
Model
Fitting the Model
ANOVA Table
◆
SSBL - Sum of squares for the blocking variable
◆
SSTR - Sum of squares for the treatment
◆
SSBL.TR - It is a new label for our SSE - it is the
interaction sum of squares between blocks and treatment
● ANOVA table
● Degrees of freedom
● Mean Square
F-test
Model Fit
Post-Hoc
More Than One Block
SST O = SSBL + SST R + SSBL.T R
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 13 of 32
Degrees of freedom
■
The degrees of freedom associated with each of these sums
of squares is as follows:
Overview
Blocking
Model
◆
SSBL - df = nb − 1 where nb is the number of blocks
◆
SSTR - df = r − 1 where r is the treatment levels
◆
SSBL.TR - df = (nb − 1)(r − 1)
◆
SSTO df = nb r − 1
Fitting the Model
ANOVA Table
● ANOVA table
● Degrees of freedom
● Mean Square
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 14 of 32
Mean Square
■
To find the MS for each effect, take the SS and divide by the
df
Overview
Blocking
Model
Fitting the Model
ANOVA Table
● ANOVA table
● Degrees of freedom
● Mean Square
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 15 of 32
What is Important?
■
The only important test in this case is as follows: Is there an
effect of the treatment?
■
We can test this doing a typically F test using the ANOVA
table.
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
● What is Important?
● Testing for Main Effect of
Treatment
● Test the Blocking Effect?
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 16 of 32
Testing for Main Effect of Treatment
■
Null Hypothesis:
Overview
H0 : all τj = 0
Blocking
Model
Ha : not all τj = 0
Fitting the Model
ANOVA Table
F-test
■
or alternatively:
● What is Important?
● Testing for Main Effect of
Treatment
H0 : µ·1 = µ·2 = . . . = µ·r
● Test the Blocking Effect?
Model Fit
Post-Hoc
Ha : not all µ·j equal
More Than One Block
More Than One Replication in
Block
■
To test:
More Than One Treatment
Design Matrix
Wrapping Up
F (r − 1, (nb − 1)(r − 1)) =
M ST R
M SBL.T R
Slide 17 of 32
Test the Blocking Effect?
■
You can test the blocking variable, but that usually isn’t
important to you.
■
It shouldn’t matter if the blocking variable is significant if you
are testing the effect of your treatment variable.
■
If you did want to test it, just in case, you would perform a
usual F test:
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
● What is Important?
● Testing for Main Effect of
Treatment
● Test the Blocking Effect?
Model Fit
M SBL
F (nb − 1, (nb − 1)(r − 1)) =
M SBL.T R
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 18 of 32
Model Fit
Overview
■
Once the model is fit, how do we know it is appropriate?
■
Here are some of the signs the model does not fit are:
Blocking
Model
Fitting the Model
◆
Unequal error variance for blocks.
◆
Unequal error variance for treatments.
◆
Time effect.
◆
Block-Treatment Interaction.
ANOVA Table
F-test
Model Fit
● Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
■
Most of these can be done by residual plotting.
■
The interaction effect can be done by mean plotting (or an
interaction plot).
Design Matrix
Wrapping Up
Slide 19 of 32
Post-Hoc analysis
■
Good news, all that stuff we learned about testing means is
still applicable here (Tukey, Scheffé, Bonferroni).
■
Post-hoc tests are done in the same way as were done for
the single factor studies.
■
Again, we employ the same methods as a single factor study
because the only factor of interest is the treatment.
■
We only have one treatment effect in this model, the blocking
effect is only a way to control error variance.
■
I will spare you the formulas again, but they are all on page
904 if you need a refresher.
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
● Post-Hoc analysis
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
Slide 20 of 32
Additional Blocking Variable?
■
What if we want to block on two variables instead of 1?
■
Instead of complicating things, we can trick the model into thinking that there
is only one blocking variable and analyze it in the same way.
■
For example, we want to block by gender and age.
■
Two gender groups (M and F).
■
Two age groups (drinking age, below drinking age).
■
We can think of the interaction of these as a single blocking variable with 4
levels: (M DA, M NDA, F DA, F NDA).
■
Since the blocking variable isn’t important for our analysis, there is no reason
to make things more complicated.
■
We aren’t going to test for the effect anyway, right?
Slide 21 of 32
Block Replications
■
Increasing the replications within each block may lead to an
interaction effect between the block and the treatment.
■
We don’t want to completely scrap our data, so we adjust the
model to fit the data.
■
The design is called a generalized randomized block design.
■
The model now contains an interaction term.
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
● Block Replications
● Model
● Fitting this model
More Than One Treatment
Design Matrix
Wrapping Up
Slide 22 of 32
Model
■
Add an interaction term
Yijk = µ·· + ρi + τj + (ρτ )ij + εij
Overview
Blocking
Model
■
Where:
■
µ·· is a constant
Fitting the Model
ANOVA Table
P
F-test
Model Fit
■
ρi constant for the block (row) effects with
ρi = 0
P
τj constant for treatment effects with τj = 0
■
(ρτ )ij constant and sum over both subscripts
■
εij independent N (0, σ 2
■
Post-Hoc
More Than One Block
More Than One Replication in
Block
● Block Replications
● Model
● Fitting this model
More Than One Treatment
Design Matrix
Wrapping Up
Slide 23 of 32
Fitting this model
■
This model fits like the two-way ANOVA model, with different
notation.
■
The difference will be in the notation and what you want to
test.
■
Want to test Treatment Effects.
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
● Block Replications
● Model
● Fitting this model
More Than One Treatment
Design Matrix
Wrapping Up
Slide 24 of 32
Adding a Treatment
■
The models above all assumed that we only had one
treatment that we were interested in.
■
How many studies are run nowadays with only one
treatment?
■
So, we want to encompass a two factor design with a block.
■
This is actually fairly easy, we take our two factor design
model from Tuesday, and add a blocking factor.
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
● Adding a Treatment
● Model
● Sum of Squares
● Degrees of Freedom
● F-test
Design Matrix
Wrapping Up
Slide 25 of 32
Model
■
Adding a Blocking Effect (and changing subscripts)
Overview
Yijk = µ··· + ρi + αj + βk + (αβ)jk
Blocking
Model
■
Where:
■
µ··· is a constant
Fitting the Model
ANOVA Table
F-test
Model Fit
■
Post-Hoc
More Than One Block
■
More Than One Replication in
Block
■
More Than One Treatment
● Adding a Treatment
● Model
■
● Sum of Squares
● Degrees of Freedom
● F-test
Design Matrix
■
τj constant for treatment effects with
P
αj constant with αi = 0
P
βk constant with
βj = 0
P
P
j (αβ)jk = 0 and
k (αβ)jk = 0
P P
j
k (αβ)jk
P
τj = 0
=0
Wrapping Up
Slide 26 of 32
Sum of Squares
■
Overview
Our Sum of Squares partitions in the normal way:
SST O = SSBL + SST R + SSBL.T R
Blocking
Model
■
Fitting the Model
ANOVA Table
F-test
Model Fit
But now we are going to partition our SSTR further into
components associated with each effect
SST R = SSA + SSB + SSAB
Post-Hoc
More Than One Block
More Than One Replication in
SST O = SSBL + SSA + SSB + SSAB + SSBL.T R
Block
More Than One Treatment
● Adding a Treatment
● Model
● Sum of Squares
● Degrees of Freedom
● F-test
Design Matrix
Wrapping Up
Slide 27 of 32
Degrees of Freedom
Overview
■
These are again partitioned in the "usual" way:
■
SSBL - df = nb − 1 where nb is the number of blocks
■
SSTR - df = r − 1 where r is the treatment levels
Blocking
Model
Fitting the Model
◆
This gets further partitioned
◆
SSA df = a − 1
◆
SSB df = b − 1
◆
SSAB df = (a − 1)(b − 1)
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
■
SSBL.TR - df = (nb − 1)(r − 1)
■
SSTO df = nb r − 1
● Adding a Treatment
● Model
● Sum of Squares
● Degrees of Freedom
● F-test
Design Matrix
Wrapping Up
Slide 28 of 32
F-test
■
For each of the three treatment effects, we then take the MS
associated with each effect and divide by our MSE (in this
case MSBL.TR)
■
We have the same null hypothesis, the same F-test, the
same calculation of the degrees of freedom, etc.
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
● Adding a Treatment
● Model
● Sum of Squares
● Degrees of Freedom
● F-test
Design Matrix
Wrapping Up
Slide 29 of 32
Design Matrix
■
As things get more and more complicated, it takes longer to
write out the design matrix
■
So, let’s consider a simple study, what would be the design
matrix if we had two blocks with one treatment that had 2
levels?
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
● Design Matrix
Wrapping Up
Slide 30 of 32
Final Thought
■
Today we found out how we
can control for additional
factors in an experiment by
adding a blocking factor to
our analysis.
■
The way this works is by
partitioning variance due to
the blocking factor out of
the error variance.
■
In essence, this is what will happen when our blocking factor
becomes a continuous variable (next chapter).
■
ANCOVA is coming.
Overview
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
● Final Thought
● Next Class
Slide 31 of 32
Next Time
Overview
■
Chapter 22 (ANCOVA - Analysis of Covariance).
■
No class next week.
Blocking
Model
Fitting the Model
ANOVA Table
F-test
Model Fit
Post-Hoc
More Than One Block
More Than One Replication in
Block
More Than One Treatment
Design Matrix
Wrapping Up
● Final Thought
● Next Class
Slide 32 of 32
Download