NOTES Module 2 - ANOVA (Analysis of Variance)
NOTES Module 2 - ANOVA (Analysis of Variance)
09/06
T-test in Review
→ the test-statistic t turns the observed difference into a relative difference (can only be used to compare
two groups)
→ the observed difference is divided by a measure of variation called the standard error
Table
● Interpretation t-statistic: the observed difference is 2.8 standard errors above zero (= no
difference)
Analysis of variance
ANOVA
● DV is interval/ratio scale
● IV is nominal scale
● ANOVA compares 3 (or more) groups
T-test is always for two groups, so we need to chance the formula and convert the definition
→ instead, we look at variance ( → ANOVA) we convert t-statistic to the F-statistic
Observed variance
● Variance between the group means
● = variance explained by the groups
● = model variance
● Model Mean Square = 𝑀𝑆𝑀
Expected variance
● Variance within the groups
● = variance not explained by the groups
● = residual variance
● Residual Mean Square = 𝑀𝑆𝑅
Steps in ANOVA
Step 1. Homogeneity
Levene’s test
● If not significant → assume homogeneity
● If significant, check rule of thumb
Interpretation
● .01 small i.e. the conditions have a small effect
● .09 medium
● .25 largeF
Post-hoc test
● T-tests, but with an adjusted p-values
● Have two groups - makes pairs and compare them
● Uses adjusted p-values
○ We have more than one pair
○ The Type I error gets inflated (adjusted p-value lessens this)
ANOVA is regression
ANOVA can be seen as a regression model with dummy variables
Meeting 9: Factorial ANOVA
10/06
ANCOVA
When the second variable is an interval variable
Factorial ANOVA
ANOVA with more than one factor
In case of two factors
● Factor A with a levels
● Factor B with b levels
Examples of interaction
1) a. There is no main effect b. Yes, because the lines are parallel
3) a. Yes, for males it changes, but does not change for females b. No
RQ: Does watching pictures have the same effect on men as it has on women?
Two-Way ANOVA
● Main effect condition
○ Are the self ratings the same in all three conditions
● Main effect gender
○ Are the self ratings the same for men and women
● Interaction
○ Are the differences between the conditions the same for men and women?
The interaction between gender and experimental condition was found to be not significant, F(2, 74) =
0.21, p = .808. So we rerun the model without the interaction
After the removal of the interaction term, both main effects were found to be significant. The difference
between men and women was significant, F(1, 76) = 13.13, p = .001, η2 = .147, indicating a medium
effect. The difference between the three experimental conditions was significant, F(2, 76) = 8.09, p =
.001, η2 = .176, indicating a medium effect.
Step 5. Post-hoc
Post-hoc tests revealed a significant difference between the experimental conditions ‘beautiful women’
and ‘beautiful men’ (p = .016) and between the experimental conditions ‘beautiful women’ and the
control group (p = .001). The difference between the control group and ‘beautiful men’ was not
significant.
Profile plot
● Here it is more parallel and no interaction
Meeting 10: Analysis of Covariance (ANCOVA)
13/06
ANOVA
→ comparing more than two groups
Factorial ANOVA
Only with a factor
Analysis of Covariance
ANCOVA → compares levels of a factor, while controlling for a covariate
● Factor: nominal/categorical IV
● Covariate: an interval/ ratio IV
● Adding a covariate to ANOVA and controlling it
= fix the covariate so the difference is equal between two lines
Why a covariate
● To correct for differences between factor levels on this covariate
● To increase power to detect differences between populations
Example A
ANCOVA: assumptions
1) DV y and covariate x are linearly related (quadratic term)
2) Homogeneity of variances
● As in ANOVA - Levene’s test
3) Homogeneity of regression slopes
● Regression slopes are parallel
● No interaction between factor and covariate
● If significant, include in the model
Example: ANOVA
RQ: Does talking on the phone interfere with people’s driving skills
Steps in ANCOVA
Step 1. Linear dependency
We see from the graph that they are linear in each condition
Step 4. ANCOVA
Model without interaction
● The effect of condition, after controlling for age, is significant
○ Age is a good covariate in this model (large effect): p < .001, η2 = .332
○ There are significant differences between the adjusted means of the three conditions, p =
.028, η2 = .120 (medium effect)
Step 4.
15/06
Remember ANOVA
● Comparing two or more groups
● Groups are independent
● Often used in experimental design
Example 1
RQ: Do the OCD-scores change significantly over time?
When assumption violated → look at the measure called Epsilon: use the value to determine which
alternative we should use
We look at the first row because the assumption was met (Mauchly’s test was not significant)
Pairwise comparisons
● The first treatment scores 3.55 times lower than the second treatment, (p = .006) and 5.83 times
lower than the third treatment (p < .001).
● Difference between time 1 and 2, and difference between 1 and 3 are significant
● The difference between time 2 and 3 is not significant
Example 2
→ assumption not satisfied: when looking at Epsilon, we should use Greenhouse-Geisser alternative
Because the assumption of sphericity was violated, the Greenhouse-Geisser alternative was used. No
significant difference was found, F (2.04, 22.39) = 3.13, p = .062. ANOVA is not significant.
Example 3
In total, there are 4 conditions
● Gambling with their own money instead someone else’s money
● The risk is low instead of high
○ Low risk is that you gain or lose a little
2 within-subject factors DV
Person (Self, Other) % of choices that can be considered hazardous
Risk (High, Low)
Assumption of sphericity
We have two levels, there is only one difference, so that is why there is a dot
→ assume sphericity
Test of within-subject effect
The effect of person is significant, p < .001
The effect of risk is significant, p < .001
The interaction between risk and person is significant, p = .008
Profile plot: they are not parallel → shows that there is interaction
Descriptive statistics
The CI is for the mean
We don’t have a post hoc test because there are only two groups so we know already where the difference
is
Mixed designs
Have both within-subjects and between-subjects factors
Effects
● Main effects of within and between subject factor
● Interaction between within and between-subjects factor
Example 4A
RQ: Does sleep deprivation reduce depression symptoms?
Within-subject factor
● Time (before, after)
Between-subject factor
● Condition (sleep deprivation, control)
Dependent variable
● Symptoms of depression
To compare the symptoms of depression on the post-test between the two groups, we can control for the
differences on the pre-test
● When we only have two measurement moments, we can analyze the data using ANCOVA
Example 4B
RQ: Does sleep deprivation reduce depression symptoms?
Within-subject factor
● Time (before, mid, end, after)
Between-subject factor
● Condition (sleep deprivation, control)
Dependent variable
● Symptoms of depression
Sphericity
Mauchly’s test not significant → Sphericity assumption is met
Within-subjects effects
Look at the first row because Sphericity is met
Interaction is also significant: the changes over time for the control group differ significantly from how
the means change over time for the sleep deprivation group
Condition is significant, meaning that they are different from the control group
Meeting 12: Multivariate Analysis of Variance
15/06
Example
There are 4 dependent variables
Multivariate differences
2 DV and 2 groups
Factor: 3 conditions
● No breastfeeding (control)
● Breastfeeding (physical hypothesis)
● Breast milk but no breastfeeding (social hypothesis)
Null hypothesis
Assumption of MANOVA
1) Homogeneous covariance matrices
● The covariance matrices of the DV’s are the same in each group
● Check with Box’s M-test (comparable to Levene’s test)
→ instead of having one variance, we have a covariance matrix because we have more
than one DV variables (this matrix should be the same in all conditions)
Covariance
● Measure the variation of both variables
● Measures joint variation
Steps in MANOVA
Extensions MANOVA
Factorial MANOVA
● More than one factor
MANCOVA
● Inclusion of covariate(s)
Same principle
● Check multivariate effects
● If significant, interpret univariate models
Without interaction
● Multivariate main effects significant
● Look at separate ANOVAs
Meeting 13: Recap Module 2
20/06
Ancova
● Want parallel lines in the graph
Tips
● More than two tables (SPSS output)
○ Which of the following is correct
○ May try to confuse us
● Try to tell us a story about the experiment
○ Ask which statement is correct based on this report
○ Eta-squared
● True and false questions
○ Repeated measures
○ Compare two kind of anovas
● Plots
○ The one with the circles
● Two conditions
○ Whether it is possible to include one more factor or covariate to the analysis
● Profile plot
○ Which one is correct from the output
○ When the lines are close to each other → then there is no effect