Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity:...

59
Repeated Measures Analysis of Variance

Transcript of Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity:...

Page 1: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures Analysis of Variance

Page 2: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Review

Univariate Analysis of Variance

GroupA

GroupB

GroupC

Page 3: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures Analysis of Variance

ConditionA

ConditionB

ConditionC

Page 4: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures Analysis of Variance

Day1

Day2

Day3

Page 5: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Basic Logic of RM ANOVA

Hypothesis Testing

Ho : υ1 = υ2 = υ3

H1 : υ1 ≠ υ2 ≠ υ3 (at least one difference)

Page 6: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Basic Logic of RM ANOVA

F =MSconditionsMSerror

Variance explained by treatment

Variance explained by error

Page 7: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Basic Logic of RM ANOVA

F =MSconditionsMSerror

Note, Msconditions is the same as Msbetween, whats different is the error term.

Page 8: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Within Subjects ANOVA (Repeated Measures)

Explained VarianceUnexplained Variance

(Error)

Subjects Variance

Unexplained Variance

(Error)

Explained Variance

Between Subjects ANOVA

Page 9: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Recall, between subjects ANOVA

SS total = SS between + SS within

Deviations of subject scores from the cell

mean

Deviations of group means from the grand

mean

Page 10: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

SStotal = SSconditions + SSsubjects + SSerror

Deviations of subjectMEANS from the

grand mean

Deviations of condition MEANS

from the grand mean

Page 11: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

An Example

Page 12: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures ANOVACondition

P One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 7

Page 13: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures ANOVACondition

P One Two Three1 4 4 6 4.6662 3 4 6 3.6663 4 3 5 44 3 5 5 4.3335 3 4 7 4.666

3.4 4 5.44.266

x

x

x ..

Page 14: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Recall…

SS = (x − x GM )2

Page 15: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

SSconditions

SSconditions = n (x∑ conditions− x..)

2

SSconditions = 5[(3.4 − 4.266)2 +...]

SSconditions =10.533

Page 16: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

SSsubjects

SSsubjects = k (x∑ subjects− x..)

2

SSsubjects = 3[(4.666 − 4.266)2 + ...]

SSsubjects = 2.266

Page 17: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

SSerror = SStotal - SSconditions - SSsubjects

SSerror

SSerror = 18.933 – 10.533 – 2.266

SSerror = 6.133

Page 18: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Recall…

MS =SSdf

Page 19: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Degrees of Freedom

ConditionP One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 4

dftotal = N - 1

Page 20: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Degrees of Freedom

dfconditions = k - 1

ConditionP One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 4

Page 21: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Degrees of Freedom

dfsubjects = n - 1

ConditionP One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 4

Page 22: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Degrees of Freedom

dferror = dfconditions * dfsubjects

ConditionP One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 4

Page 23: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures ANOVA Summary Table

Source df SS MS F

Subjects n-1 SSsubjects

Conditions k-1 SSconditions

Error (n-1)*(k-1) SSerror

Total N-1 SStotal

SSconditionsdfconditions

SSerrordferror

MSconditionsMSerror

Page 24: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures ANOVA Summary Table

Source df SS MS F

Subjects 4 2.266

Conditions 2 10.533 5.267 6.870

Error 8 6.133 0.767

Total 14 18.933

Page 25: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Post-Hoc Comparisons:Simple Effects Analysis

Page 26: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures ANOVACondition

P One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 7

Page 27: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures ANOVACondition

P One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 7

Page 28: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Repeated Measures ANOVACondition

P One Two Three1 4 4 62 3 4 63 4 3 54 3 5 55 3 4 7

Page 29: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

1. Normality

Page 30: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

1. Normality

Page 31: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

2. Homogeneity of Variance

σ12 =σ 2

2 =σ 32

Page 32: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

3. The Assumption of Sphericity

Correlations among pairs of variables are equal…

NO!

Page 33: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Sphericity

• Sphericity is the property that the covariance of the difference scores of the IV levels are same

• Violations generally lead to inflated F statistics (and hence inflated Type I error).

Page 34: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

SphericityMaulchy’s Test

Page 35: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

What does it mean?Effect DFn DFd F p gescondition 2 30 4.473097 0.01994544 * 0.07827009

Mauchly's Test for SphericityEffect W p condition 0.9392082 0.6446637

Sphericity CorrectionsEffect GGe p[GG] HFe pcondition 0.942692 0.02222867 1.073846 0.01994544

Page 36: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Okay, if the sphericity test is not significant…

Keep on going…

Page 37: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Okay, if the sphericity test is significant…

1) Check epsilon. The epsilon means the departure from the sphericity, in other words, how far the data is from the ideal sphericity.

The epsilon is a number between 0 and 1, if the epsilon is equal to 1, the data have sphericity.

Page 38: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Look at…$ANOVA

Effect DFn DFd F p p<.05 ges2 condition 2 30 4.473097 0.01994544 * 0.07827009

$`Mauchly's Test for Sphericity`Effect W p p<.05

2 condition 0.9392082 0.6446637

$`Sphericity Corrections`Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05

2 condition 0.942692 0.02222867 * 1.073846 0.01994544 *

Page 39: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Which one should I look at?

Generally, Greenhouse-Geisser.

BUT… if GG epsilon > 0.75

USE Huynh-Feldt.

WHY? GG tends to be too strict when epsilon is large.

ALSO, use Huynh-Feldt when n is small (less than 15)

Page 40: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

What do I do with it?

The test provides you with the corrected pvalue.

Page 41: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Look at…$ANOVA

Effect DFn DFd F p p<.05 ges2 condition 2 30 4.473097 0.01994544 * 0.07827009

$`Mauchly's Test for Sphericity`Effect W p p<.05

2 condition 0.9392082 0.6446637

$`Sphericity Corrections`Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05

2 condition 0.942692 0.02222867 * 1.073846 0.01994544 *

Page 42: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

But you also have to…

Correct df’s… (effect and error term)

Multiply then by Epsilon:

2 * 0.942692 = 1.885

Page 43: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

Page 44: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2
Page 45: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

But what is SPERICITY?

Page 46: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Variance

s2 =(X − X)2∑N −1

Page 47: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

CovarianceThe degree to which two variables vary together.

COVxy =(x − x∑ )(y − y)N −1

Page 48: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

CovarianceThe degree to which two variables vary together.

1 12 23 34 4

COV = 1.25

1 12 13 14 1

COV = 0

1 42 33 24 1

COV = -1.25

1 22 43 94 16

COV = 5.875

Page 49: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

3. Sphericity

ConditionOne Two Three Four

One S12

Two S22

Three S32

Four S42

Page 50: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

3. Sphericity

ConditionOne Two Three Four

One S12 S12 S13 S14

Two S21 S22 S23 S24

Three S31 S32 S32 S34

Four S41 S42 S43 S42

Page 51: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

3. Sphericity: Compound Symmetry

ConditionOne Two Three Four

One S12 S12 S13 S14

Two S21 S22 S23 S24

Three S31 S32 S32 S34

Four S41 S42 S43 S42

The variances AND covariances are equal

Page 52: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

3. Sphericity: Difference Scores

ConditionP C1-C2 C1-C3 C1-C41 x11-x12 x11-x13 x11-x14

2 x21-x22 x21-x23 x21-x24

3 x31-x32 x31-x33 x31-x34

4 x41-x42 x41-x43 x41-x44

The variances of the difference scores are equal

Page 53: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Assumptions of repeated measures ANOVA

3. Sphericity: Covariance Matrix

The variances of the difference scores are equal€

Sx−y2 = Sx

2 + Sy2 − 2Sxy

Page 54: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Factorial Repeated Measures ANOVA

Page 55: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

An Example

Participants in an experiment are asked to perform a cued reaction time task when they are alert and when they are fatigued. As such, you have participants performing a reaction time task with three conditions (valid cue, no cue, invalid cue) when they are either alert or fatigued.

Page 56: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

An Example

Main Effect: Fatigue (Alert, Fatigued)

Main Effect: Condition (Valid Cue, No Cue, Invalid Cue)

Interaction: Fatigue x Condition

Page 57: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Condition

Reac

tion

Tim

e (m

s)

Alert Fatigued

Page 58: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Cue

Reac

tion

Tim

e (m

s)

Valid InvalidNone

Page 59: Repeated Measures Analysis of Variance · Assumptions of repeated measures ANOVA 3. Sphericity: Compound Symmetry Condition One Two ThreeFour One S 1 2 S 12 S 13 S 14 Two S 21 S 2

Cue

Reac

tion

Tim

e (m

s)

Valid InvalidNone