/
Correlated-Samples ANOVA Correlated-Samples ANOVA

Correlated-Samples ANOVA - PowerPoint Presentation

cheryl-pisano
cheryl-pisano . @cheryl-pisano
Follow
452 views
Uploaded On 2016-03-10

Correlated-Samples ANOVA - PPT Presentation

The Univariate Approach An ANOVA Factor Can Be Independent Samples Between Subjects Correlated Samples Within Subjects Repeated Measures Randomized Blocks Split Plot Matched Pairs if k ID: 250439

subjects week weeks test week subjects test weeks error anova subject effect 0001 model repeated sphericity variance factors means samples effects treatment

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Correlated-Samples ANOVA" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Correlated-Samples ANOVA

The

Univariate

ApproachSlide2

An ANOVA Factor Can Be

Independent Samples

Between Subjects

Correlated Samples

Within Subjects, Repeated Measures

Randomized Blocks

Matched Pairs if

k

= 2Slide3

The Design

DV = cumulative duration of headaches

Factor 1 = Weeks

Factor 2 = Subjects (crossed with weeks)

The first two weeks represent a baseline period.

The remaining three weeks are the treatment weeks.

The treatment was designed to reduce headaches.Slide4

The Data

Subject

Wk1

Wk2

Wk3

Wk4

Wk5

1

21

22

8

6

6

2

20

19

10

4

4

3

17

15

5

4

5

4

25

30

13

12

17

5

30

27

13

8

6

6

19

27

8

7

4

7

26

16

5

2

5

8

17

18

8

1

5

9

26

24

14

8

9Slide5

Crossed and Nested FactorsSubjects is crossed with Weeks here – we have score for each subject at each level of Week.

That is, we have a Weeks x Subjects ANOVA.

In independent samples ANOVA subjects is nested within the other factor

If I knew the subject ID, I would know which treatment e got.Slide6

Order Effects

Suppose the within-subjects effect was dose of drug given (0, 5, 10 mg)

DV = score on reaction time task.

All subjects tested first at 0 mg, second at 5 mg, and thirdly at 10 mg

Are observed differences due to dose of drug or the effect of order

Practice effects and fatigue effectsSlide7

Complete Counterbalancing

There are

k!

possible orderings of the treatments.

Run equal numbers of subjects in each of the possible orderings.

Were

k

= 5, that would be 120 different orderings.Slide8

Asymmetrical Transfer

We assume that the effect of A preceding B is the same as the effect of B preceding A.

Accordingly, complete counterbalancing will cancel out any order effects

If there is asymmetrical transfer, it will not.Slide9

Incomplete Counterbalancing

Each treatment occurs once in each ordinal position.

Latin Square

A B C D E

E

A B C D

D

E A B C

C

D E A B

B

C D E A Slide10

Power

If the correlations between conditions are positive and substantial, power will be greater than with the independent samples designs

Even though error

df

will be reduced

Because we are able to remove subject effects from the error term

Decreasing the denominator of the

F

ratio.Slide11

Reducing Extraneous Variance

Matched pairs,

randomized

blocks.

Repeated measures or within-subjects.

Variance due to the blocking variable is removed from error variance.Slide12

Partitioning the SS

The sum of all 5 x 9 = 45 squared scores is

11,060.

The

correction for the mean, CM, is

(596)

2

/ 45 =

= 7893.69.

The

total

SS

is then 11,060 ‑ 7893.69 =

3166.31.Slide13

SSweeks

From the marginal totals for week we compute the

SS

for the main effect of Week as: (201

2

+ 198

2

+ 84

2

+ 52

2

+ 61

2

) / 9 ‑ 7893.69 = 2449.20

.

W

j

is the sum of scores for the

j

th

week.Slide14

SSSubjects

From the subject totals, the

SS

for subjects is: (63

2

+ 57

2

+ ...... + 81

2

) / 5 ‑ 7893.69 = 486.71

.

S

is the sum

of

scores

for one subjectSlide15

SSerror

We have only one score in each of the 5 weeks x 9 subjects = 45 cells.

So the traditional within-cells error variance does not exist.

The appropriate error term is the Subjects x Weeks Interaction.

SS

Subjects

x

Weeks

=

SS

total

SS

subjects

– SS

weeks

=

3166.31 ‑ 486.71 ‑ 2449.2 = 230.4.

Slide16

df, MS

,

F

,

p

The

df

are computed as usual in a factorial ANOVA ‑‑ (

s

‑1) = (9‑1) = 8 for Subjects, (

w

‑1) = (5‑1) = 4 for Week, and 8 x 4 = 32 for the

interaction.

The

F

(4, 32) for the effect of Week is then (2449.2/4) / (230.4/32) = 612.3/7.2 = 85.04,

p

<

.001

. Slide17

Assumptions

Normality

Homogeneity of Variance

Sphericity

For each (

ij

) pair of levels of the Factor

Compute (Y

i

Y

j

) for each subject

The standard deviation of these difference scores is constant – that is, you get the same

SD

regardless of which pair of levels you select.Slide18

Sphericity

Test it with

Mauchley’s

criterion

Correct for violation of

sphericity

by using a procedure that adjust downwards the

df

Or by using a procedure that does not assume

sphericity

.Slide19

Mixed Designs

You may have one or more correlated ANOVA factors and one or more independent ANOVA factorsSlide20

Multiple Comparisons

You can employ any of the procedures that we earlier applied with independent samples ANOVA.

Example: I want to compare the two baseline weeks with the three treatment weeks.

The means are

(201 + 198)/18 =

22.17 for baseline, (

84 + 52 + 61)/27 =

7.30 for treatment.Slide21

t

The 7.20 is the

MSE

from the overall analysis.

df

= 32, from the overall analysis

p

< .001Slide22

Controlling 

FW

Compute

And use it for

Tukey

or related procedure

Or apply a

Bonferroni

or

Sidak

procedure

For example, Week 2 versus Week 3

t

= (22‑9.33)/SQRT(7.2(1/9 + 1/9)) = 10.02,

q

= 10.02 * SQRT(2) = 14.16

.

For

Tukey

, with

r

= 5 levels, and 32

df

, critical

q

.01

= 5.05Slide23

Heterogenity of Variance

If suspected, use individual error terms for a posteriori comparisons

Error based only on the two levels being compared.

For Week 2 versus Week 3,

t

(8) = 10.75,

q

(8) = 15.2

Notice the drop in

dfSlide24

SAS

WS-

ANOVA.sas

 

data headache; input

Subject Week Duration

; cards;

1 1 21

1 2 22

1 3 8

1 4 6

1 5 6 Slide25

5 x 9 = 45 data lines

2 1 20

2 2 19

2 3 10

2 4 4

2 5 4

………………

9 5 9Slide26

Proc ANOVA or GLM

Proc

Anova

;

Class Subject Week;

Model Duration

=

Subject Week; run;

SAS will use

SS

error

=

SS

total

SS

subjects

SS

weeks

Which is the

SS

Subjects

X

WeeksSlide27

Source

DF

Anova

SS

Mean Square

F Value

Pr > F

subject

8

486.7111

60.83888

8.45

<.0001

week

4

2449.200

612.3000

85.04

<.0001

Source

DF

Sum of Squares

Mean Square

F Value

Pr > F

Model

12

2935.91111

244.65925

33.98

<.0001

Error

32

230.40000

7.200000

 

 

Corrected Total

44

3166.31111

 

 

 Slide28

Data in Multivariate Setup

data

ache;

input

subject week1-week5

;

d23 = week2-week3;

cards

;

1 21 22 8 6 6

2 20 19 10 4 4

3 17 15 5 4 5

4 25 30 13 12 17

5 30 27 13 8 6

6 19 27 8 7

4

And data for three more subjectsSlide29

Week 2 versus Week 3

proc

ANOVA

;

model

week2 week3 = /

nouni

;

repeated

week

2

/

nom

;

The value of

F

here is just the square of the value of

t

, 10.75, reported on Slide 23, with an individual error term.

Source

DF

Anova SS

Mean Square

F Value

Pr > F

week

1

722.0000

722.0000

115.52

<.0001

Error(week)

8

50.00000

6.250000

 

 Slide30

proc

means

mean

t

prt

;

var

d23 week1-week5;Slide31

Proc

Anova

;

Model

week1-week5 = /

nouni

;

Repeated

week

5

profile

/

summary

printe

;

Sphericity

Tests

Variables

DF

Mauchly's Criterion

Chi-Square

Pr > ChiSq

Orthogonal Components

9

0.2823546

8.1144619

0.5227

We retain the null that there is

sphericity

.Slide32

Univariate Tests of Hypotheses for Within Subject Effects

Source

DF

Anova SS

Mean Square

F Value

Pr > F

Adj Pr > F

G - G

H - F

week

4

2449.2

612.30

85.04

<.0001

<.0001

<.0001

Error(week)

32

230.40

7.2000

 

 

 

Greenhouse-

Geisser

Epsilon

0.6845

Huynh-Feldt Epsilon

1.0756Slide33

Epsilon

Used to correct for lack of

sphericity

Multiply both numerator and denominator

df

by epsilon.

For example:

Degrees of freedom were adjusted according to Greenhouse and

Geisser

to correct

for violation

of the assumption of

sphericity

. Duration of

headches

changed significantly across the weeks,

F

(2.7, 21.9) = 85.04,

MSE

= 7.2,

p

< .001.Slide34

Which Epsilon to Use?

The G-G correction is more conservative (less power) than the H-F

correction.

If

both the G-G and the H-F

are near

or above .75, it is probably best to use

the

H-F

.Slide35

Profile Analysis

Compares each level with the next level, using individual error.

Look at the output.

Week 1 versus Week 2,

p

= .85

Week 2 versus Week 3,

p

< .001

Week 3 versus Week 4,

p

= .002

Week 4 versus Week 5,

p

= .29 Slide36

Multivariate Analysis

MANOVA Test Criteria and Exact F Statistics for the Hypothesis of no week Effect

Statistic

Value

F Value

Num DF

Den DF

Pr > F

Wilks

' Lambda

0.01426

86.39

4

5

<.0001

Pillai's

Trace

0.98573

86.39

4

5

<.0001

Hotelling-Lawley

Trace

69.1126

86.39

4

5

<.0001

Roy's Greatest Root

69.1126

86.39

4

5

<.0001Slide37

Strength of Effect

2

=

SS

weeks

/

SS

total

= 2449.2/3166.3 = .774

Alternatively, if we remove from the denominator variance due to subjects,Slide38

Higher-Order Mixed or Repeated Univariate

Models

If the effect contains only between-subjects factors, the error term is Subjects(nested within one or more factors).

For

any effect that includes one or more within-subjects factors the error term is the interaction between Subjects and those one or more within-subjects factors.Slide39

AxBxS Two-Way Repeated

Measures

CLASS

A B S; MODEL Y=A|B|S;

TEST

H=A E=A

S;

TEST

H=B E=B

S;

TEST

H=A

B E=A

B

S;

MEANS

A|B;Slide40

Ax(BxS) Mixed (B Repeated)

CLASS

A B S; MODEL Y=A|B|S(A);

TEST

H=A E=S(A);

TEST

H=B A

B E=B

S(A);

MEANS

A|B;Slide41

AxBx(CxS

) Three-Way Mixed (C Repeated

)

CLASS

A B C S

;

MODEL

Y=A|B|C|S(A B);

TEST

H=A B A

B E=S(A B);

TEST

H=C A

C B

C A

B

C E=C

S(A B);

MEANS

A|B|C;Slide42

Ax(BxCxS)

Mixed

(

B and C Repeated

)

CLASS

A B C

S;

MODEL

Y=A|B|C|S(A);

TEST

H=A E=S(A);

TEST

H=B A

B E=B

S(A);

TEST

H=C A

C E=C

S(A);

TEST

H=B

C A

B

C E=B

C

S(A);

MEANS

A|B|C;Slide43

AxBxCxS All Within

CLASS

A B C S; MODEL Y=A|B|C|S;

TEST

H=A E=A

S;

TEST

H=B E=B

S;

TEST

H=C E=C

S;

TEST

H=A

B E=A

B

S;

TEST

H=A

C E=A

C

S;

TEST

H=B

C E=B

C

S;

TEST

H=A

B

C E=A

B

C

S;

MEANS

A|B|C;