Lecture 6: Two way independent ANOVA Flashcards
What is the decision tree of choosing a two-way independent ANOVA? - (5)
Q: What sort of measurement? A: Continuous
Q:How many predictor variables? A: Two or more
Q: What type of predictor variable? A: Categorical
Q: How many levels of the categorical predictor? A: Not relevant
Q: Same or Different participants for each predictor level? A: Different
Partial eta-squared should be reported for
ANOVA and ANCOVA
How is partial-eta squared calculated?
SS effect/ SS effect + SS error
What is the two drawbacks of eta-squared?
as you add more variables to the model, the proportion explained by any one variable will automatically decrease.
How is eta-squared calculated?
Sum of squares between (squares of effect) divided by sum of squared total (squares of everything - effects, errors and interactions)
In one-way ANOVA eta-squared and partial-eta squared will be eequal but not true in models with
more than one IV
Two-way Independent ANOVA is also called an
Independent Factorial ANOVA
What is a factorial design?
When experiment has two or more IVs
What are the 3 types of factorial design? - (3)
- Independent factorial design
- Repeated-measures (related) factorial design
- Mixed design
What is independent factorial design?
- There is many IVs or predictors that each have been measured using different pps (between grps)
What is repeated-measures (related) factorial design?
- Many IVs or predictors have been measured but same pps used in all conditions
What is mixed design?
- Many IVs or predictors have been measured; some measured with diff pps whereas others used same pps
Which design does independent factorial ANOVA use?
Independent factorial design
What is factorial ANOVA?
When we use ANOVA to analyse a situation in which there is two or more IVs
What is difference between one way and two way ANOVA?
A one-way ANOVA has one independent variable, while a two-way ANOVA has two.
Example of two-way independent factorial ANOVA
The study tested the prediction that subjective perceptions of physical attractiveness become inaccurate after drinking alcohol which is IV, DVs
- What are the IVs, DVs- (3)
IV = Alcohol - 3 levels = Placebo, Low dose, High dose
Iv = face type 2 levels = unattractive, attractive
DV = Physical attractiveness score
Two way independent ANOVA can be fit into the idea of
linear model
The study tested the prediction that subjective perceptions of physical attractiveness become inaccurate after drinking alcohol which is IV, DVs (example of two-way ANOVA)
IV = Alcohol - 3 levels = Placebo, Low dose, High dose
Iv = face type 2 levels = unattractive, attractive
DV = Physical attractiveness score
Fit this into a linear model
The study tested the prediction that subjective perceptions of physical attractiveness become inaccurate after drinking alcohol
IV = Alcohol - 3 levels = Placebo, Low dose, High dose
Iv = face type 2 levels = unattractive, attractive
DV = Physical attractiveness score
Create a linear model for this two-way ANVOA scenario which adds interaction term and explain why is it important - (3)
- The first equation models the two predictors in a way that allows them to account for variance in the outcome separately, much like a multiple regression model
- The second equation adds a term that models how the two predictor variables interact with each other to account for variance in the outcome that neither predictor can account for alone.
- The interaction is important to us because it tests our hypothesis that alcohol will have a stronger effect on the ratings of unattractive than attractive faces
The study tested the prediction that subjective perceptions of physical attractiveness become inaccurate after drinking alcohol ,
IV = Alcohol - 3 levels = Placebo, Low dose, High dose
Iv = face type 2 levels = unattractive, attractive
DV = Physical attractiveness score
What is shown in the interaction table? - (2)
Coding 0 or 1 for categorical variables of type of face and alcohol
interaction codes is zero for all conditions other than the one when both predictors are ‘present’.
The study tested the prediction that subjective perceptions of physical attractiveness become inaccurate after drinking alcohol
IV = Alcohol - 3 levels = Placebo, Low dose, High dose
Iv = face type 2 levels = unattractive, attractive
DV = Physical attractiveness score
What does b3 (interaction coefficient ) in this two-way ANOVA situation represent? - (3)
measures how the effect of face type (on face ratings) depends on the dose of alcohol
If b3 is large in size, either positive or negative, we will now that alcohol dose has a large effect on the ratings of different face types.
If, however, the interaction coefficient is small, we would know that difference in ratings of attractiveness resulting from different face types would not depend on the alcohol dose.
The study tested the prediction that subjective perceptions of physical attractiveness become inaccurate after drinking alcohol which is IV, DVs
IV = Alcohol - 3 levels = Placebo, Low dose, High dose
Iv = face type 2 levels = unattractive, attractive
DV = Physical attractiveness score
What does these graph show? - (2)
- First graph shows that unattractive faces have a higher attractiveness rating under high dose of alcohol compared to control and attractiveness rating does not differ too much but slightly decline in high dose for attractive faces = interaction term will be large
- Second graph shows difference in rating attract and unattractive faces does not differ between placebo and high dose = interaction effect is small
How do we know coefficients in model are significant in two-way ANCOVA?
We follow the same routine , similar to one-way ANOVA, to compute sums of squares for each factor of the model (and their interaction) and compare them to the residual sum of squares, which measures what the model cannot explain
How is two-way independent ANOVA similar to one-way ANOVA?
, we still find the total sum of squared errors (SST) and break this variance down into variance that can be explained by the experiment (SSM) and variance that cannot be explained (SSR).
How is two-way ANOVA different to one-way ANOVA? - (3)
in two-way ANOVA, the variance explained by the experiment is made up of not one experimental manipulation but two.
Therefore, we break the model sum of squares down
into variance explained by the first independent variable (SSA), variance explained by the second independent variable (SSB) and variance explained by the interaction of these two
variables (SSA × B)
How to calculate total sum of squares SST in two-way independent ANOVA?
What is SST DF in two-way independent ANOVA?
N- 1
How to compute model sum of squares SSM in two-way independent ANOVA? - (2)
sum of all grps (pairing each level of IV with another)
n = number of scores in each grp which is multipled by the mean value of each group subtracted by grand mean of all pps regardless of grp squared
How to compute degrees of freedom of SSM in two-way independent ANOVA?
(g-1)
How many groups are there in this research two-way independent ANOVA?
IV = Alcohol - 3 levels = Placebo, Low dose, High dose
Iv = face type 2 levels = unattractive, attractive
DV = Physical attractiveness score
placebo + attractiveness
placebo + untractiveness
low dose +attractiveness
low dose + unattractiveness
high dose +attractiveness
high dose +unattractiveness - 6 grps
How is SSA computed in two-way independent ANOVA? - (2)
considering only two groups at a time and add together - for first IV variable (SSA) (e.g., grps of pps rated attractive and grp of pps that rated unattractive)
number of pps in that grp multiplied by mean of grp subtracted by grand mean overall of all pps squared
What is the degrees of freedom in SSA?
DF = (g-1) so if male and female then 2 -1 = 1
How to compute SSB in two-way independent ANOVA? - (3)
same formula as SSA but for the second IV
added for all grps of pps in second IV
number of pps in one grp of secondIV(mean score of that grp subtract by grand mean of all pps regardless of grp) squared
Example of calculating SSB/SSA
What is DF for SSB in two-way independent ANOVA?
number of grps in second IV minus 1
SS A X B in two-way independent ANOVA is calculating how much variance is explaiend
by the interaction of 2 variables
How is SS A X B (interaction term) calculated in two-way ANOVA?
SS A X B = SSM - SSA - SSB
How is SS A X B’S DF calculated in two-way independent ANOVA?
df A X B = df M - df A - df B
The SSR in two-way independent ANOVA, is similar to one-way ANOVA as it represents the
individual differences in performance or the variance that can’t be explained by factors that were systematically manipulated.
How to calculate SSR in two-way independent ANOVA?
- use individual variances of each grp (e.g., attractiveness face type + placebo) and multiply by one less than number of people within the group (n - in this case 6) and do it for each group and add it together
How to calculate SSR in two-way independent ANOVA?
number of grps you have in study(number of scores you have per group minus 1)
Each effect in two-way ANOVA (two main effect and interaction) has its own F-ratio and to calculate it we first need to calculate
the mean squares for each effect by taking sum of squares and dividng by respective DF
Diagram of calculating mean sums of squares in two-way ANOVA independent
Diagram of calculating F ratios for two independent and interaction
Each F-ratios for each IV and interaction can be compared against critical value (based on its DF) and tell us
whether these effects are likely to
reflect data that have arisen by chance, or reflect an effect of our experimental manipulations
Each of these F-ratios can be compared against critical values (based on their degrees of
freedom,
If observed F exceeds critical value then
it is significant
What effect sizes can we calculate with two-way independent ANOVA? - (2)
- Partial eta-squared
- Omega-squared if advised
What to do whe assumptions are violated in factorial independent ANOVA? - (3)
- There is not a simple non-parametric counterpart of factorial ANOVA
- If assumption of normality is violated then use robust methods described in Wilcox’s and files in R
- If assumptions of homogenity of variance then implement corrections based on Welch procedure
Example of a research scenario of two-way independent ANCOVA
Pick out IVs and DVs - (4)
- Independent samples design
- Two Ivs, both 2 conditions: drug type (A, B) and onset (early, late)
- One DV is cognitive performance
- Two way ANOVA
What does this two-way ANOVA independent design SPSS output show?
- The levene’s test is not significant so assume equal variances
What happens if Levene’s test is significant in two-way independent ANOVA?
steps taken to equalise variances through data transformation
What does this two-way independent ANOVA table show - (4)
- Drug : F(1,24) = 5.58, p = 0.027, partial eta-squared = 0.19 (large effect + sig effect)
- Onset: F(1,24) = 14.43, p = 0.001, partial eta-squared = 0.38 (large effect + sig effect)
- Interaction Drug * Onset: F(1,24) = 9.40, p = 0.005, partial eta-squared = 0.28 (large effect + sig effect)
- We got two sig main effects and sig interaction effect which are all quite large effect sizes
What does this SPSS output show for two-way independent ANOVA? - (3)
drug B has higher score on cognitive test than A and is sig main effect (CI does not contain 0 and also main effect analysis)
early onset scoring higher on average than late onset (CI does not contain 0 and also main effect analysis)
Important of these main effect as main effects ignoring the effec tof other IV so results for drug at top is regardless of whether late/onset for example , does not tell anything for interaction
What does this interaction plot show? - (6)
- Blue line is early onset
- Green line is late onset
- For late onset, drug B lead to higher mean scores on test than drug A
- For early onset, drug B led to slightly higher mean scores than drug B
- Drug A more effective then drug b for early onset but different marginal
- Drug B was substantially more effective than Drug A for late
Non-parallel lines in interaction plot indicate an
sig interaction effect
We can follow interactions in two-way ANOVA with simple effects analysis which - (2)
- looks at the effect of one IV at individuals levels of other IV
- Seeing whether differences margina/substantial is sig
The SSM in two-way independent ANOVA is broken down into three components:
variance explained by the first independent
variable (SSA), variance explained by the second independent variable (SSB ) and variance explained by the interaction of these two variables (SSA × B
).
Example of difference of one-way ANOVA vs two-way ANOVA (independent) - (2)
- One-way ANOVA have one IV categorical variable (level of educaiton - college degree, grad degree, high school)
- Two-way ANOVA , you have 2 categorical IV variables - level of education (college degree, grad degree, high school) and zodaic sign (libra, pisces)