ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between...

31
Repeated-measures ANOVA Chapter 10

Transcript of ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between...

Page 1: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Repeated-measures

ANOVA

Chapter 10

Page 2: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Vitamin C

Study: Year 1 = # of cold symptoms, Year 2 = # cold

symptoms with treatment

Factor: Group

Placebo

Low dose of Vitamin C

High dose of Vitamin C

Dependent variable: Difference in cold symptoms

from year 1 to year 2

Hypotheses

Page 3: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Boxplot of Vitamin C data

101010N =

Vitamin C Treatment

hilowplacebo

DIF

F

20

10

0

-10

-20

3

1

Page 4: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Vitamin C: Data

Report

DIFF

3.50 10 4.143 35

-2.10 10 4.067 -21

-2.00 10 5.477 -20

-.20 30 5.182 -6

Vitamin C Treatment

placebo

low

hi

Total

Mean N Std. Deviation Sum

Report

DIFF2

27.7000 10 47.32406 277.00

19.3000 10 24.23977 193.00

31.0000 10 12.75408 310.00

26.0000 30 30.87014 780.00

Vitamin C Treatment

placebo

low

hi

Total

Mean N Std. Deviation Sum

X2

T1= T2= T3= G=

SS1= SS2= SS3= x2=

n1= n2= n3= N=

M1= M2= M3= k=

Page 5: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Vitamin C: Data

Report

DIFF

3.50 10 4.143 35

-2.10 10 4.067 -21

-2.00 10 5.477 -20

-.20 30 5.182 -6

Vitamin C Treatment

placebo

low

hi

Total

Mean N Std. Deviation Sum

Report

DIFF2

27.7000 10 47.32406 277.00

19.3000 10 24.23977 193.00

31.0000 10 12.75408 310.00

26.0000 30 30.87014 780.00

Vitamin C Treatment

placebo

low

hi

Total

Mean N Std. Deviation Sum

T1= 35 T2= -21 T3= -20 G= -6

SS1= SS2= SS3= x2=

n1= 10 n2= 10 n3= 10 N= 30

M1=

3.5

M2=

-2.1

M3=

-2.0

k= 3

Page 6: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Vitamin C: Data

Report

DIFF

3.50 10 4.143 35

-2.10 10 4.067 -21

-2.00 10 5.477 -20

-.20 30 5.182 -6

Vitamin C Treatment

placebo

low

hi

Total

Mean N Std. Deviation Sum

Report

DIFF2

27.7000 10 47.32406 277.00

19.3000 10 24.23977 193.00

31.0000 10 12.75408 310.00

26.0000 30 30.87014 780.00

Vitamin C Treatment

placebo

low

hi

Total

Mean N Std. Deviation Sum

T1= 35 T2= -21 T3= -20 G = -6

SS1=

154.5

SS2=

148.9

SS3=

270

x2=

780

n1= 10 n2= 10 n3= 10 N= 30

M1= 3.5 M2= -2.1 M3= -2.0 k= 3

N

XXSS

22 )(

10

)35(277

2

SS

10

)21(193

2

SS

10

)20(310

2

SS

Page 7: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Vitamin C: Data

T1= 35 T2= -21 T3= -20 G = -6

SS1= 154.5 SS2= 148.9 SS3= 270 x2= 780

n1= 10 n2= 10 n3= 10 N= 30

M1= 3.5 M2= -2.1 M3= -2.0 k= 3

N

GXSS

22

30

)6(780

2

SS

Total SS:

Within SS:

Between SS:

SS: 154.5 + 148.9 + 270 = 573.4

778.8

N

G

n

TSSbetween

22

30

6

10

20

10

21

10

35 2222

betweenSS 205.4

Page 8: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Vitamin C: Data

T1= 35 T2= -21 T3= -20 G = -6

SS1= 154.5 SS2= 148.9 SS3= 270 x2= 780

n1= 10 n2= 10 n3= 10 N= 30

M1= 3.5 M2= -2.1 M3= -2.0 k= 3

between

between

betweendf

SSMS

within

within

withindf

SSMS

within

between

MS

MSF7.102

2

4.205betweenMS

237.2127

4.573withinMS

836.4237.21

7.102F

dfbetween = k – 1

dfwithin = N - k

Critical F @ .05 = 3.35, @ .01 = 5.49

Page 9: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

ANOVA summary table

SPSS v. Write-up

Source df SS MS F

Between

Within

2

27

205.4

573.4

102.7

21.2

4.84*

Total 30 778.8

ONEWAY ANOVA

DIFF

205.400 2 102.700 4.836 .016

573.400 27 21.237

778.800 29

Between Groups

Within Groups

Total

Sum of

Squares df Mean Square F Significance

* Significant at the .02 level

Page 10: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Vitamin C: Conclusions

A one-way ANOVA was conducted to

examine the hypothesis that different types of

vitamin C treatment have a differential effect

on cold symptoms compared to prior years

without the treatment.

It was found that the number of colds were

significantly different for the placebo (M =

3.5), low dose (M = -2.1), and high dose (M =

-2.0) groups, F(2, 27) = 4.8, p < .05.

Page 11: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Post Hoc Tests

Significant ANOVA – there is at least 1 mean that is different

Post-tests examine which means are and are not significantly different

Compare 2 means at a time (pair-wise comparisons)

Type I error: divide alpha among all tests need to do Planned comparisons: based on predictions

Tukey’s HSD

Scheffe test (numerator is for MSbetween for only the two treatments you want to compare)

Bonferroni

Page 12: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Zettergren (2003)

School adjustment in adolescence for previously rejected, average, and popular children.

Effect of peer reputation on academic performance and school adjustment

IV or Factor = Peer reputation 3 levels: rejected, average, popular (based on…)

3rd and 4th grade students ranked every classmate (same gender) in the order they wanted them to stay with the class if they were to move to a smaller room and not everyone could go

DV = Academic ability (8th grade)

DV = Attitudes toward school (8th grade)

Page 13: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Zettergren (2003) results

Page 14: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Self-esteem study:Self-Esteem Descriptor (SED) at 5, 7, 9, 11, 13

2525252525N =

Self-esteem at age 1

Self-esteem at age 1

Self-esteem at age 9

Self esteem at age 7

Self-esteem at age 5

160

140

120

100

80

60

40

20

0

-20

6

3

8

115

3

11

3

125

11

Page 15: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Self-esteem: Between subject

ONEWAY Descriptives

SED

25 33.8800 27.91702 5.58340 22.3564 45.4036 2.00 106.00

25 27.6000 35.35180 7.07036 13.0075 42.1925 1.00 138.00

25 29.6000 31.49206 6.29841 16.6007 42.5993 3.00 127.00

25 29.9600 34.86340 6.97268 15.5691 44.3509 1.00 125.00

25 16.0800 16.95071 3.39014 9.0831 23.0769 1.00 66.00

125 27.4240 30.20181 2.70133 22.0773 32.7707 1.00 138.00

1.00

2.00

3.00

4.00

5.00

Total

N Mean Std. Deviation Std. Error Lower Bound Upper Bound

95% Confidence Interval for

Mean

Minimum Maximum

ONEWAY ANOVA

SED

4539.088 4 1134.772 1.254 .292

108567.4 120 904.729

113106.5 124

Between Groups

Within Groups

Total

Sum of

Squares df Mean Square F Significance

Page 16: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Self-esteem: Within subject

Descriptive Statistics

33.88 27.917 25

27.60 35.352 25

29.60 31.492 25

29.96 34.863 25

16.08 16.951 25

Self-esteem at age 5

Self esteem at age 7

Self-esteem at age 9

Self-esteem at age 11

Self-esteem at age 13

Mean Std. Deviation N

Tests of Within-Subjects Effects

Measure: MEASURE_1

4539.088 4 1134.772 4.771 .001

4539.088 2.989 1518.796 4.771 .004

4539.088 3.461 1311.589 4.771 .003

4539.088 1.000 4539.088 4.771 .039

22834.512 96 237.859

22834.512 71.727 318.355

22834.512 83.058 274.922

22834.512 24.000 951.438

Sphericity Assumed

Greenhouse-Geisser

Huynh-Feldt

Lower-bound

Sphericity Assumed

Greenhouse-Geisser

Huynh-Feldt

Lower-bound

Source

AGE

Error(AGE)

Type III Sum

of Squares df Mean Square F Sig.

Page 17: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Self-esteem: Planned contrasts

Paired Samples Test

6.28 18.311 3.662 -1.28 13.84 1.715 24 .099

4.28 22.868 4.574 -5.16 13.72 .936 24 .359

3.92 22.546 4.509 -5.39 13.23 .869 24 .393

17.80 20.738 4.148 9.24 26.36 4.292 24 .000

Self-esteem at age 5 -

Self es teem at age 7

Pair

1

Self-esteem at age 5 -

Self-esteem at age 9

Pair

2

Self-esteem at age 5 -

Self-esteem at age 11

Pair

3

Self-esteem at age 5 -

Self-esteem at age 13

Pair

4

Mean Std. Deviation

Std. Error

Mean Lower Upper

95% Confidence

Interval of the

Difference

Paired Differences

t df Sig. (2-tailed)

Paired Samples Statistics

33.88 25 27.917 5.583

27.60 25 35.352 7.070

33.88 25 27.917 5.583

29.60 25 31.492 6.298

33.88 25 27.917 5.583

29.96 25 34.863 6.973

33.88 25 27.917 5.583

16.08 25 16.951 3.390

Self-esteem at age 5

Self es teem at age 7

Pair

1

Self-esteem at age 5

Self-esteem at age 9

Pair

2

Self-esteem at age 5

Self-esteem at age 11

Pair

3

Self-esteem at age 5

Self-esteem at age 13

Pair

4

Mean N Std. Deviation

Std. Error

Mean

Page 18: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Self-esteem write-up

Within-subject design

A longitudinal study was conducted on self-esteem. A repeated-measures ANOVA was conducted over five time periods; five years old (M = 33.88, SD = 27.92), seven years old (M = 27.60, SD = 35.35), nine years old (M = 29.60, SD = 31.49), 11 years old (M = 29.96, SD = 34.86), and 13 years old (M = 16.08, SD = 16.95). A significant effect of age was found, F (4, 96) = 4.77, p = .001.

Post-hoc tests were performed comparing the youngest age (five years old) with each of the other ages (7, 9, 11, and 13 years). One significant result was found. Self-esteem at age five (M = 33.88, SD = 27.92) was significantly different compared to self-esteem at age 13 (M = 16.08, SD = 16.95), t(24) = 4.29, p < .001. This suggests that self-esteem remains stable from age five until age 11, and then declines at age 13.

Page 19: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

ANOVA: Partitions the Variance

Total Variance

Between Treatment Variance

1. Treatment effects

2. Chance

Within Treatment Variance

Chance

Between variance----------------------Within variance

F =

Page 20: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Repeated-measures ANOVA

gro

up

rating0 5 10 15

1

2

3

Page 21: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

One-way v. Repeated ANOVA

One-way ANOVA chance/error = Between subject individual differences

For overall sample

For each group

Within subject experimental error

Repeated ANOVA chance/error= Between subject sampling error (only for overall sample)

Within subject experimental error

Advantage to remove individual differences that can mask effect

orchance/err

orchance/err effect treatment F

error

between

MS

MSF

Page 22: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Repeated-measures ANOVA

One-way or independent-measures ANOVA

w/o individual differences error

Advantage: remove individual differences that

can mask treatment effect

orchance/err

orchance/err effect treatment F

error

between

MS

MSF

Page 23: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Structure of data sets

One-way v. Repeated ANOVA

Group Data

1 52

1 67

1 33

2 59

2 42

2 56

3 52

3 49

3 53

Ss Test1 Test2 Test3

1 52 59 52

2 67 42 49

3 33 56 53

Page 24: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Pain Relief

The effect of drug treatment on the amount of

time (in seconds) a stimulus is endured.

Page 25: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Pain relief by subject

0

1

2

3

4

5

6

7

8

Placebo DrugA DrugB DrugC

Page 26: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

MSerror

Page 27: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

The partitioning of degrees of freedom

for a repeated-measures experiment

Page 28: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Compute df

For N = 20; k = 4; n = 5

dftotal = N – 1

20 – 1 = 19

dfbetween = k – 1

4 – 1 = 3

dfwithin = N – k

20 – 4 = 16

dfbetween subjects = n – 1

5 – 1 = 4

dferror = dfwithin – dfbetween subjects

= 16 – 4 = 12

Page 29: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

The partitioning of sum of squares (SS) for

a repeated-measures analysis of variance

Page 30: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

Calculate MS and F-ratio

Critical F @ .05 = 3.49, @ .01 = 5.95

F (3, 12) = 24.88, p < .01

between

betweenbetween

df

SSMS

error

error

errordf

SSMS

error

between

MS

MSF

67.163

50betweenMS

67.012

8errorMS

88.2467.0

67.16F

Page 31: ANOVA - Wofford College 10_Anova2.pdfANOVA summary table SPSS v. Write-up Source df SS MS F Between Within 2 27 205.4 573.4 102.7 21.2 4.84* Total 30 778.8 ONEWAY ANOVA DIFF 205.400

ANOVA summary table: Repeated-measures

50

32

24

8

82

3

16

4

12

19

16.67

0.67

24.88*

Significant at p < .01