Download presentation
Presentation is loading. Please wait.
1
Psych 706: stats II Class #12
2
TODAY One more class after this one! Mixed ANOVA
One between and one within subjects variable Multivariate ANOVA (MANOVA) Tutorial: Mixed ANOVA and MANOVA
3
Mixed anova At least one between-subjects variable AND Assumptions:
At least one within-subjects variable Assumptions: Normality/Linearity Homogeneity of Variance Sphericity
4
Mixed anova example Angry Pigs.sav Game where you fire birds at pigs
Does playing Angry Birds make you more violent over time? Game = between-subjects variable (Angry Birds vs. Tetris) Time = within-subjects variable (put in pig pen at baseline, 1 month, 6 months, and 12 months) Dependent variable = aggression (# violent acts toward pigs)
6
Create one within-subject factor: Time
Analyze General Linear Model Repeated Measures Create one within-subject factor: Time # Levels = 4 Click Define
7
Move all four aggression variables (in order) to within-subjects box
Move game groups to between-subjects box
8
SPSS selects Polynomial for Time (your repeated measures variable)
Apriori Contrasts SPSS selects Polynomial for Time (your repeated measures variable) But nothing is selected for Game (between-subjects)
9
Create main effect and interaction graphs
Plots Create main effect and interaction graphs
10
(only for between-subjects)
Post-Hoc (only for between-subjects) You only have two groups to compare for Game So you’ll get an error if you try to run them
11
Compare main effects with Bonferroni correction
Options Display means Compare main effects with Bonferroni correction Descriptive stats Effect size Homogeneity test (for Game groups)
12
Click Paste Button to open Syntax Window!
13
Let’s add code to break down our interaction
14
Let’s add code to break down our interaction
Compare Games within Time Compare Times within Game
15
Highlight code and Press Play!
17
Sphericity Assumption is met
Homogeneity of Variance violated!
18
Significant Main Effect of Time
19
Significant Time x Game Interaction
20
Significant Main Effect of Game: Angry Birds > Tetris
22
Time 4 > Time 1
23
Time 4 > Time 2
24
Time 4 > Time 3
25
12 months ** ** ** 6 months Baseline 1 month
27
Time 1: Tetris > Angry Birds
28
Time 3: Angry Birds > Tetris
29
Time 4: Angry Birds > Tetris
30
Tetris > Angry Birds at Baseline
12 months Tetris > Angry Birds at Baseline 6 months ** Baseline 1 month ** ** Angry Birds > Tetris at 6 and 12 months
31
All of the action is for Angry Birds
Time 2-4 > Time 1 Time 4 > Time 2-3
32
Aggression was lower at Baseline than 1, 6, and 12 months
For Angry Birds group, Aggression was lower at Baseline than 1, 6, and 12 months Aggression increased first at 1-6 months, then again at 12 months 12 months ** ** ** 6 months 1 month ** * Baseline
34
Problem with interpretation
Homogeneity of Variance assumption is not met Transformation needed? Also check out Normality to see if any outliers are causing problems I wouldn’t write this up for a manuscript until I dealt with these assumptions
35
Questions before we go on to MANOVA?
36
Manova Analysis with multiple dependent variables (DVs)
Can use with 1 or more independent variables DVs do not have to be on the same scale (typically with repeated measures ANOVA they are on the same scale) BONUS #1: Takes into account the correlation between DVs BONUS #2: You don’t have to worry about the Sphericity assumption!
37
Manova Detects whether groups differ along a linear combination of DVs
Can be more powerful than ANOVA to detect group differences (depending on correlation between your variables and effect size you want to detect) Typically, you use MANOVA when your DVs are all linked in some way Example: Say you measured anger by self-report, behavior, heart rate, and brain activity – since they are all thought to reflect the same emotion, it makes sense to put them in a MANOVA together as DVs
38
ANOVA: Review of key concepts
Sums of Squares (SS) Total = Each score minus grand mean, squared and summed Sums of Squares (SS) Model = Each group mean minus grand mean, squared and summed Variance due to your treatment/group effect Sums of Squares (SS) Residual (ERROR) = Each score minus group mean, squared and summed Variance due to individual differences, etc.
39
ANOVA: Review of key concepts
Mean Square (MS) Model = SS Model / SS Model degrees of freedom Mean Square (MS) Residual = SS Residual / SS Residual degrees of freedom ANOVA F test = MS Model / MS Residual
40
MANOVA (with two dvs) DV1 F-test = MS Model / MS Residual
Cross-Products (CP) between DV1 and DV2 CP Total = SS Total DV1 * SS Total DV2 CP Model = SS Model DV1 * SS Model DV2 CP Residual = SS Residual DV1 * SS Residual DV2 MORE THAN ONE value is output, so these values are stored in matrices
41
Sums of Squares and Cross-Products Matrix (SSCP)
Total Model Residual Called Hypothesis (H) SSCP Contains SS Model DV1 SS Model DV2 CP Model (DV1*DV2) Called Error (E) SSCP Contains SS Residual DV1 SS Residual DV2 CP Residual (DV1*DV2) Called Total SSCP Contains SS Total DV1 SS Total DV2 CP Total (DV1*DV2)
42
MATRICES Test matrix = Hypothesis (H) SSCP matrix / Error (E) SSCP matrix Because we’re dealing with matrices, we have multiple outputs to deal with (for 2 DVs we have 4, for 3 DVs we have 9, for 4 DVs we have 16, etc.) Then using the test matrix, we create discriminant function variates Linear dimensions of the DVs that best predict group/treatment membership Orthogonal (meaning they aren’t correlated with each other) Compare variates you got to what you’d expect by chance
43
MANOVA Test statistics
Pillai-Bartlett trace (V) Proportion of SS Model / SS Total for variates ~ R² The higher #, the better Hotelling’s T² Sum of variates’ SS Model / SS Error ~ F-test in ANOVA Wilks’s Lambda (Λ or L) Sum of variates’ SS Residual / SS Error The lower #, the better Roy’s Largest Root Hotelling’s T² but for the first variate ONLY For small/medium sample sizes, these don’t differ in power to detect significance
44
Manova assumptions Normality
Homogeneity of variance across groups (Levine’s test; violated if p<.05) Homogeneity of covariance (correlations between DVs similar) across groups (Box’s test of Equality of Covariance Matrices; violated if p<.05)
45
VIOLATION OF ASSUMPTIONS
Pillai-Bartlett trace (V) If equal sample sizes, most robust to violation of assumptions If unequal sample sizes, if homogeneity of covariance and normality is met, then use this test Roy’s Largest Root Not good for platykurtic distributions Not good when homogeneity of covariance violated
46
Example: OCD.sav Groups of patients with OCD: Two DVs:
Group #1: Cognitive Behavioral Therapy (CBT; n=10) Group #2: Behavioral Therapy (BT; n=10) Group #3: No Treatment Control (NT; n=10) Two DVs: # obsessional thoughts in a normal day (Thoughts) # obsessional behaviors in a normal day (Actions, aka compulsions)
47
No outliers or extreme scores
48
Normality looks to be a problem for:
BT for Actions (but Shapiro-Wilk = n.s.) NT for Thoughts (both tests p<.05) Let’s check skewness/kurtosis and histograms though
49
I used the Graphs Chart Builder
50
THOUGHTS Considered non-normal; I checked skewness and kurtosis z-scores and they were all well within +/- 1.96
51
ACTIONS Considered non-normal; I checked skewness and kurtosis z-scores and they were all well within +/- 1.96
52
However, no transformation worked well for the BT group for Actions.
I transformed the DVs in various ways and the one working the best for the Thoughts NT group was log-transformation. However, no transformation worked well for the BT group for Actions. Since in the untransformed data, Shapiro-Wilk wasn’t significant along with the K-S test, I’m going to run the MANOVA with Actions as non-transformed.
53
THOUGHTS – Log Transformed
THOUGHTS – Raw Data THOUGHTS – Log Transformed
54
2 DVs: log-transformed Thoughts and raw data Actions
General Linear Model Multivariate
55
Plots: Add Group
56
Are helpful here because we have three groups
Post-Hoc Tests Are helpful here because we have three groups However, just so you know, these are univariate tests, not multivariate
57
In this case, we don’t need to display means for Group and compare main effects because we are already doing that in Post-Hoc tests. You are getting descriptives, effect size, SSCP matrices, and Levine’s test.
58
Let’s check out our OUTPUT!
59
Homogeneity of covariance assumption holds up!
Box’s Test: Homogeneity of covariance assumption holds up! Bartlett’s Test: Sphericity isn’t an assumption for MANOVA so it doesn’t matter that the sphericity assumption is violated. However, this sphericity violation tells us that if we were to run a repeated measures ANOVA using this data, we’d have to use an Epsilon correction like GG/HF
60
[See page 653 in Field for specifics on how to report each test]
All tests indicate that therapy had a significant impact on OCD clients’ thoughts and actions. [See page 653 in Field for specifics on how to report each test]
61
Homogeneity of variance assumption holds up!
Levene’s Test: Homogeneity of variance assumption holds up!
62
These are univariate ANOVAs for Group for Thoughts and Actions separately. Neither ANOVA is significant. This suggests that our sig MANOVA is due to shared covariation between Thoughts and Actions that is driving the Group effect.
63
It looks like there are no sig group differences in means.
These are post-hoc comparisons looking at group differences within each DV separately. It looks like there are no sig group differences in means.
64
No sig post-hoc effects for Actions
No sig post-hoc effects for Thoughts
65
Thoughts: CBT had less obsessions than the other two groups, but this was not significant with univariate ANOVA
66
Actions: BT had less compulsions than the other groups, but this wasn’t significant with univariate ANOVA
67
Breaking down Manova Discriminant (Function) Analysis
Which variate(s) best differentiate groups Analyze Classify Discriminant
68
Grouping Variable box:
Independents box: Log-transformed Thoughts Actions
69
Define Groups: 1 = CBT 2 = BT 3 = NT So we want to type min=1 and max = 3
70
Unstandardized values so this isn’t something you’d report –
Statistics button Unstandardized values so this isn’t something you’d report – They just help you figure out how the variates relate to each other within each group (positively related, negatively related, or unrelated)
71
You would change this if you had unequal sample sizes
Classify button You would change this if you had unequal sample sizes Plots variate scores for each participant based on their group membership Shows how well variates classify actual participants
72
Save button Might be useful for your research to have variate scores for each individual in case you want to plot them later, or correlate them with other variables in the future
73
Unstandardized values so this isn’t something you’d report
Thoughts and Actions unrelated Thoughts and Actions positively related Thoughts and Actions negatively related
74
You square this correlation value to get R² measure of effect size
The MANOVA was followed up with discriminant analysis, which revealed two discriminant functions. The first explained 82% of the variance, canonical R² = .26, whereas the second explained only 18%, canonical R² = .07.
75
Tests whole model, then next variate with first variate removed
In combination, these discriminant functions significantly differentiated the treatment groups, L = 0.69, χ2(4) = 9.91, p = .04. However, removing the first function indicated that the second function did not significantly differentiate the treatment groups, L = 0.93, χ2(1) = 1.96, p = .16.
76
Because these are correlations, they can vary from -1 to 1
First variate differentiates thoughts and actions, but in different directions Second variate differentiates thoughts and actions, but in the same direction
77
Correlations between outcomes and the discriminant functions revealed that thoughts loaded fairly evenly highly onto both functions (r = -.74 for the first function and r = .70 for the second), whereas actions loaded more highly on the first function (r = .80) than the second function (r = .62).
78
Mean variate scores for each group
Look at -/+ direction to interpret Function 1 separates CBT from BT Function 2 separates NT from the therapy groups (CBT/BT)
79
Function 1 (Horizontal) separates CBT from BT Function 2 (Vertical)
separates NT from the therapy groups (CBT/BT)
80
The discriminant function plot showed that the first function discriminated the BT group from the CBT group, and the second function differentiated the NT group from the two interventions.
81
Classification was decent for CBT and BT participants (6/10 in each group), but not so much for NT (2/10) [You don’t need to report results from this table, but it gives you more info on your data]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.