Factorial ANOVA
Factorial ANOVA
One-Way ANOVA:
Total = Treatment A + Error
Factorial ANOVA:
Total = Treatment A + Treatment B + Treatment C ….. + Error
Total = Treatment A + Treatment B + Treatment A*B ….. + Error
When to use it?
Factorial ANOVA When we have TWO treatments/factors (we will use A and B to
represent them in the class). The treatments/ factors (A and B) with
2 or more levels for each treatment.
One-Way ANOVA
When we perform a
factorial design,
remember that we have
multiple effects now.
For example, we will
have IV A and IV B,
which represented
different treatments.
Effect A
A Factorial Design
If we look at them
separately, we can
examine the main effects.
Effect B
A Factorial Design
When we perform a
factorial design,
remember that we have
multiple effects now.
If the design is a two-
way ANOVA design, that
means we have two
predictors, and we will
have two main effects
and an interaction effects
(potentially).
Interaction Effect
For example, now we are running a test to see if soda and candy would have
impacts to individuals’ weights.
IV A: Soda
IV B: Candy
DV: Weight
Interaction Effect
Main effect: the means across levels of treatment A are different, and to the same
degree for all levels of treatment B.
Example: Eating candy (IVA) will increase individuals’ risk of death, with the
same degree for all individuals who are also drinking soda (IVB).
Interaction Effect
A simple main effect is a main effect of one factor at a given level of a second
factor, in other words, how the DV varies across levels of treatment A with a
specific level of treatment B.
Example:
1. Eating candy (IVA) will increase individuals’ risk of death more, for those
individuals who drink soda (IVB1) than those individuals who don’t drink soda
(IVB2).
2. Drinking soda (IVB) will increase individuals’ risk of death more, for those
individuals who eat candy (IVA1) than those individuals who don’t eat candy
(IVA2).
SS in factorial design
Blocking:
Total SS = SSB + SSW = SStreatment effect + SSblock + SSerror
Factorial:
Total SS = SSB + SSW
Normality
Observations are drawn from a normally distributed population.
Independence of observations
Observations are randomly sampled from the population , or subjects are randomly
assigned to treatment groups, so that all the observations in the within groups and the
between groups are independent.
Equal variance
The observations have equal variances across groups.
Application
Factorial Design: Procedure
The data set from the first class contains another column that includes whether
the valuation was made for a product or gamble so we have data that we can
analyze using a factorial ANOVA.
In our example we have a 3 X 2 design, so we need at least six observations
where each observation was randomly and independently generated under the
same circumstances.
Use the ANOVAexample.
Most of the time we are going to want to employ a factorial
design when we have more than one factor of interest.
For example, if we are interested in the effects of Perspective
and Item Type and their potential interaction effects, we would
set up our experiment so that each factor is present at each
other factors levels
Application
Application
A study was conducted to investigate whether, taken together, a person’s status and
product gamble form affected individuals’ valuation of the product. Observations from the study
were analyzed by conducting a two-way analysis of variance with the two independent variables
(condition and product or gamble) and the dependent variable (valuation) using R version 3.61.
First, all assumptions are met and there is no adjustment made. ANOVA analysis revealed
there is no statistically significant interaction effect (F(2, 234) = 2.698, p = .070). Results also
suggest that the valuations of an item’s worth was affected by the status of (as buyers, sellers, or
choosers) the participants (F(2, 234) = 23.45, p < .001) and product or gamble (F(1, 234) = 43.98,
p < .001).
In a current study, we want to test if the two types of drugs with different levels,
will have impacts on individuals' stamina.
Use the data “Week 4 Practice”.
IVs?
DV?
Three-Way Interaction
Understanding a 3 Way Interaction
Generally if you have a two-way (or greater) ANOVA you will want to see if your factors
interact.
What if you fit the model with the interaction and it is not significant. Can you remove
it?
Some say yes, if it is not significant you can safely ignore it and therefore should not
include it in your model (the same could be said for any non-significant predictor).
Others would argue that even if not significant you should include it to control for any
effect that is present in the interaction (you'll likely have to report it in academics
anyways).
I would base such decisions on the goals of your analysis (build a model vs. test a
hypothesis).
Blocking in Factorial Designs
Blocking in Factorial Designs
Just like with one-way (one-factor) experiments with lots of levels running a factorial study can
also make it difficult to ensure all factorial combinations are sampled under the same conditions.
To remedy this we can control for those potential confounds up front by blocking.
Ideally will use a randomized complete block design – each factorial combination is present in
each block (equally often) and the assignment of those factorial combinations is random within
the block.
We would also need to make sure we don’t have any interaction with that blocking factor.
Blocking in Factorial Designs: Application
When we are dealing with some variations of factorial ANOVA we can use the
Scheirer-Ray-Hare test:
scheirerRayHare(y ~ X1 x X2, data = XXX)
Generally speaking, ANOVA will be robust to small violations of our standard
assumptions (non-normal data, unequal variances, etc.).
Nevertheless, its always a good idea to double check your analyses to be sure.
1. Why must we include interactions in factorial
experiments?
Weekly Lab 2. If we find a higher order interaction is
significant but its lower order components are
not should we include the lower order
components?