factorial within subjects psy 420 ainsworth. factorial ws designs analysis factorial – deviation...

37
Factorial Within Subjects Psy 420 Ainsworth

Upload: isabella-morgan

Post on 23-Dec-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Factorial Within Subjects

Psy 420

Ainsworth

Page 2: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Factorial WS Designs

AnalysisFactorial – deviation and computational

Power, relative efficiency and sample size Effect size Missing data Specific Comparisons

Page 3: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Example for Deviation Approach

b1: Science Fiction b2: Mystery Case

Means a1: Month 1 a2: Month 2 a3: Month 3 a1: Month 1 a2: Month 2 a3: Month 3

S1 1 3 6 5 4 1 S1 = 3.333 S2 1 4 8 8 8 4 S2 = 5.500 S3 3 3 6 4 5 3 S3 = 4.000 S4 5 5 7 3 2 0 S4 = 3.667

S5 2 4 5 5 6 3 S5 = 4.167

Treatment Means a1b1 = 2.4 a2b1 = 3.8 a3b1 = 6.4 a1b2 = 5 a2b2 = 5 a3b2 = 2.2 GM = 4.133

Page 4: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Deviation

What effects do we have?ABABSASBSABST

Page 5: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Deviation

DFsDFA = a – 1

DFB = b – 1

DFAB = (a – 1)(b – 1)

DFS = (s – 1)

DFAS = (a – 1)(s – 1)

DFBS = (b – 1)(s – 1)

DFABS = (a – 1)(b – 1)(s – 1)

DFT = abs - 1

Page 6: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Sums of Squares - Deviation

2 2 2

... . . ... .. ...

2 2 2

. ... . . ... .. ...

22 2

.. ... . . . .. ...

2

. . . .. ..

Total A B AB S AS BS ABS

ijk j j k k

jk jk j j k k

i ij j i

i k j i

SS SS SS SS SS SS SS SS

Y Y n Y Y n Y Y

n Y Y n Y Y n Y Y

jk Y Y k Y Y jk Y Y

j Y Y jk Y Y

2

.

2 2 22

. .. ... . . . . . .ijk jk i ij j i k jY Y jk Y Y k Y Y j Y Y

The total variability can be partitioned into A, B, AB, Subjects and a Separate Error Variability for Each Effect

Page 7: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Deviation

Before we can calculate the sums of squares we need to rearrange the data

When analyzing the effects of A (Month) you need to AVERAGE over the effects of B (Novel) and vice versa

The data in its original form is only useful for calculating the AB and ABS interactions

Page 8: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

For the A and AS effects

Remake data, averaging over B

a1: Month 1 a2: Month 2 a3: Month 3 Case Means

S1 3 3.5 3.5 S1 = 3.333 S2 4.5 6 6 S2 = 5.500 S3 3.5 4 4.5 S3 = 4.000 S4 4 3.5 3.5 S4 = 3.667 S5 3.5 5 4 S5 = 4.167

Treatment Means a1 = 3.7 a2 = 4.4 a3 = 4.3 GM = 4.133

Page 9: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

2 2 2 2

. . ...

2 2 2 2

.. ...

2 2

2 2

. . . .. ...

2

. . .

10*[ 3.7 4.133 4.4 4.133 4.3 4.133 ] 2.867

(3*2)*[ 3.333 4.133 5.5 4.133 4 4.133

3.667 4.133 4.167 4.133 16.467

2*[

A j j

S i

AS ij j i

ij j

SS n Y Y

SS jk Y Y

SS k Y Y jk Y Y

k Y Y

2 2 2 2 2

2 2 2 2 2

2 2 2 2 2

3 3.7 4.5 3.7 3.5 3.7 4 3.7 3.5 3.7

3.5 4.4 6 4.4 4 4.4 3.5 4.4 5 4.4

3.5 4.3 6 4.3 4.5 4.3 3.5 4.3 4 4.3 ] 20.6

20.6 16.467 4.133ASSS

Page 10: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

For B and BS effects Remake data, averaging over A

b1: Science Fiction

b2: Mystery Case Means

S1 3.333 3.333 S1 = 3.333 S2 4.333 6.667 S2 = 5.500 S3 4.000 4.000 S3 = 4.000 S4 5.667 1.667 S4 = 3.667 S5 3.667 4.667 S5 = 4.167

Treatment Means b1 = 4.200 b2 = 4.067 GM = 4.133

Page 11: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

2 2 2

.. ...

2 2

. .. .. ...

2 2 2 2

. ..

2 2 2 2

2 2

15*[ 4.2 4.133 4.067 4.133 ] .133

3*[ 3.333 4.2 4.333 4.2 4 4.2

5.667 4.2 3.667 4.2 3.333 4.067 6.667 4.067

4 4.067 1.667 4.067

B k k

BS i k k i

i k k

SS n Y Y

SS j Y Y jk Y Y

j Y Y

2

2

.. ...

4.667 4.067 ] 50

16.467

50 16.467 33.533

S i

BS

SS jk Y Y

SS

Page 12: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

For AB and ABS effects

Use the data in its original form

b1: Science Fiction b2: Mystery Case

Means a1: Month 1 a2: Month 2 a3: Month 3 a1: Month 1 a2: Month 2 a3: Month 3

S1 1 3 6 5 4 1 S1 = 3.333 S2 1 4 8 8 8 4 S2 = 5.500 S3 3 3 6 4 5 3 S3 = 4.000 S4 5 5 7 3 2 0 S4 = 3.667

S5 2 4 5 5 6 3 S5 = 4.167

Treatment Means a1b1 = 2.4 a2b1 = 3.8 a3b1 = 6.4 a1b2 = 5 a2b2 = 5 a3b2 = 2.2 GM = 4.133

Page 13: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

2 2 2

. ... . . ... .. ...

2 2 2 2

. ...

2 2 2

2

. . ...

2

.. ...

5*[ 2.4 4.133 3.8 4.133 6.4 4.133

5 4.133 5 4.133 2.2 4.133 ] 67.467

2.867

.133

67.467 2.867 .1

AB jk jk j j k k

jk jk

j j A

k k B

AB

SS n Y Y n Y Y n Y Y

n Y Y

n Y Y SS

n Y Y SS

SS

33 64.467

Page 14: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

2 2 22

. .. ... . . . . . .

2 2 2 2

.

2 2 2 2

2 2 2 2

2 2 2 2

2 2 2

1 2.4 1 2.4 3 2.4

5 2.4 2 2.4 3 3.8 4 3.8

3 3.8 5 3.8 4 3.8 6 6.4

8 6.4 6 6.4 7 6.4 5 6.4

6 5 8 5 4 5

ABS ijk jk i ij j i k j

ijk jk

SS Y Y jk Y Y k Y Y j Y Y

Y Y

2

2 2 2 2

2 2 2 2

2 2 2

3 5

5 5 4 5 8 5 5 5

2 5 6 5 1 2.2 4 2.2

3 2.2 0 2.2 3 2.2 64

64 16.467 20.6 50 9.867ABSSS

Page 15: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

2 2 2

2 2 2 2

2 2 2 2

2 2 2 2

2 2 2 2

2

1 4.133 1 4.133 3 4.133

5 4.133 2 4.133 3 4.133 4 4.133

3 4.133 5 4.133 4 4.133 6 4.133

8 4.133 6 4.133 7 4.133 5 4.133

6 4.133 8 4.133 4 4.133 3 4.133

5 4.133 4 4.133

TotalSS

2 2 2

2 2 2 2

2 2 2

8 4.133 5 4.133

2 4.133 6 4.133 1 4.133 4 4.133

3 4.133 0 4.133 3 4.133 131.467

Page 16: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Deviation

DFsDFA = a – 1 = 3 – 1 = 2

DFB = b – 1 = 2 – 1 = 1

DFAB = (a – 1)(b – 1) = 2 * 1 = 2

DFS = (s – 1) = 5 – 1 = 4

DFAS = (a – 1)(s – 1) = 2 * 4 = 8

DFBS = (b – 1)(s – 1) = 1 * 4 = 4

DFABS = (a – 1)(b – 1)(s – 1) = 2 * 1 * 4 = 8

DFT = abs – 1 = [3*(2)*(5)] – 1 = 30 – 1 = 29

Page 17: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Source SS df MS FA 2.867 2 1.433 2.774AS 4.133 8 0.517B 0.133 1 0.133 0.016

BS 33.533 4 8.383AB 64.467 2 32.233 26.135ABS 9.867 8 1.233

S 16.467 4 4.117Total 131.467 29

Source Table - Deviation

Page 18: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Computational

b1: Science Fiction b2: Mystery Case

Totals a1: Month 1 a2: Month 2 a3: Month 3 a1: Month 1 a2: Month 2 a3: Month 3

S1 1 3 6 5 4 1 S1=20

S2 1 4 8 8 8 4 S2=33

S3 3 3 6 4 5 3 S3=24

S4 5 5 7 3 2 0 S4=22

S5 2 4 5 5 6 3 S5=25

Treatment Totals

a1b1 = 12 a2b1 = 19 a3b1 = 32 a1b2 = 25 a2b2 = 25 a3b2 = 11 T = 124

Example data re-calculated with totals

Page 19: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Computational

Before we can calculate the sums of squares we need to rearrange the data

When analyzing the effects of A (Month) you need to SUM over the effects of B (Novel) and vice versa

The data in its original form is only useful for calculating the AB and ABS interactions

Page 20: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Computational

For the Effect of A (Month) and A x S

Page 21: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

22 2 2 2 2

22 2 2 2 2 2

2 2 2

37 44 43 124

2(5) 2(3)(5)

5154 15376515.4 512.533 2.867

10 30

20 33 24 22 25512.533

2(3)

3174512.533 529 512.533 16.467

6

j

A

A

i

S

S

j i j i

AS

a TSS

bs abs

SS

s TSS

ab abs

SS

a s a sSS

b bs ab

2

2 2 2 2 2 2 2 2 2 2 2 2 2 2 26 9 7 8 7 7 12 8 7 10 7 12 9 7 8

21072

515.4 529 512.533 515.4 529 512.5332

536 515.4 529 512.533 4.133

AS

AS

T

abs

SS

SS

Page 22: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Traditional

For B (Novel) and B x S

Page 23: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

22 2 2

2 2 22

2 2 2 2 2 2 2 2 2 2

63 61512.533

3(5)

7690512.533 512.667 512.533 .133

15

10 13 12 17 11 10 20 12 5 14

3512.667 529 512.533

1688512.667 529

3

k

B

B

k i k i

BS

BS

BS

b TSS

as abs

SS

b s b s TSS

a as ab abs

SS

SS

512.533

562.667 512.667 529 512.533 33.533BSSS

Page 24: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – Computational

b1: Science Fiction b2: Mystery Case

Totals a1: Month 1 a2: Month 2 a3: Month 3 a1: Month 1 a2: Month 2 a3: Month 3

S1 1 3 6 5 4 1 S1=20

S2 1 4 8 8 8 4 S2=33

S3 3 3 6 4 5 3 S3=24

S4 5 5 7 3 2 0 S4=22

S5 2 4 5 5 6 3 S5=25

Treatment Totals

a1b1 = 12 a2b1 = 19 a3b1 = 32 a1b2 = 25 a2b2 = 25 a3b2 = 11 T = 124

Example data re-calculated with totals

Page 25: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

2 2 22

2 2 2 2 2 2

2 2 2

2

2

12 19 32 25 25 11515.4 512.667 512.533

52900

515.4 512.667 512.5335

580 515.4 512.667 512.533 64.467

j k j k

AB

AB

AB

AB

j k j i k i

ABS

j

a b a b TSS

s bs as abs

SS

SS

SS

a b a s b sSS Y

s b a

a

2 22

22

644 580 536 562.667 515.4 512.667 529 512.533 9.867

644 512.533 131.467

k i

ABS

Total

b s T

bs as ab absSS

TSS Y

abs

Page 26: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Analysis – ComputationalDFs are the same

DFsDFA = a – 1 = 3 – 1 = 2

DFB = b – 1 = 2 – 1 = 1

DFAB = (a – 1)(b – 1) = 2 * 1 = 2

DFS = (s – 1) = 5 – 1 = 4

DFAS = (a – 1)(s – 1) = 2 * 4 = 8

DFBS = (b – 1)(s – 1) = 1 * 4 = 4

DFABS = (a – 1)(b – 1)(s – 1) = 2 * 1 * 4 = 8

DFT = abs – 1 = [3*(2)*(5)] – 1 = 30 – 1 = 29

Page 27: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Source Table – ComputationalIs also the same

Source SS df MS FA 2.867 2 1.433 2.774AS 4.133 8 0.517B 0.133 1 0.133 0.016

BS 33.533 4 8.383AB 64.467 2 32.233 26.135ABS 9.867 8 1.233

S 16.467 4 4.117Total 131.467 29

Page 28: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Relative Efficiency

One way of conceptualizing the power of a within subjects design is to calculate how efficient (uses less subjects) the design is compared to a between subjects design

One way of increasing power is to minimize error, which is what WS designs do, compared to BG designs

WS designs are more powerful, require less subjects, therefore are more efficient

Page 29: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Relative Efficiency

Efficiency is not an absolute value in terms of how it’s calculated

In short, efficiency is a measure of how much smaller the WS error term is compared to the BG error term

Remember that in a one-way WS design:

SSAS=SSS/A - SSS

Page 30: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Relative Efficiency

/ /

/

1 3Relative Efficiency =

3 1S A AS S A

AS AS S A

MS df df

MS df df

MSS/A can be found by either re-running the analysis as a BG design or for one-way:

SSS + SSAS = SSS/A and

dfS + dfAS = dfS/A

/

1 1 1

1S AS

S A

s MS a s MSMS

as

Page 31: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Relative Efficiency

From our one-way example:

/

/

/

9.7 9.5 19.2

4 8 12

19.2 /12 1.6

S A S AS

S A S AS

S A

SS SS SS

df df df

MS

Page 32: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Relative Efficiency

1.6 8 1 12 3Relative Efficiency = 1.26

1.2 8 3 12 1

From the example, the within subjects design

is roughly 26% more efficient than a between subjects design (controlling for degrees of freedom)

For # of BG subjects (n) to match WS (s) efficiency:

(relative efficiency) 5(1.26) 6.3 7n s

Page 33: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Power and Sample Size

Estimating sample size is the same from before For a one-way within subjects you have and AS

interaction but you only estimate sample size based on the main effect

For factorial designs you need to estimate sample size based on each effect and use the largest estimate

Realize that if it (PC-Size, formula) estimates 5 subjects, that total, not per cell as with BG designs

Page 34: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Effects Size

2 2

2

2

2

( )ˆ

( ) ( ) ( )

( )ˆ

( ) ( )

A AL

Total A S AS

A A

A error A AS

A A ASL

A A AS AS S

A A AS

A A AS AS

SS SS

SS SS SS SS

SS SSpartial

SS SS SS SS

df MS MS

df MS MS as MS s MS

df MS MSpartial

df MS MS as MS

Because of the risk of a true AS interaction we need to estimate lower and upper bound estimates

Page 35: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Missing Values

In repeated measures designs it is often the case that the subjects may not have scores at all levels (e.g. inadmissible score, drop-out, etc.)

The default in most programs is to delete the case if it doesn’t have complete scores at all levels

If you have a lot of data that’s fine If you only have a limited cases…

Page 36: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Missing Values Estimating values for missing cases in WS designs

(one method: takes mean of Aj, mean for the case and the grand mean)

' ' '*

*

'

'

'

( 1)( 1)

:

predicted score to replace missing score

number of cases

sum of known values for that case

number of levels of A

sum of known values for A

sum of all kn

i jij

ij

i

j

sS aA TY

a s

where

Y

s

S

a

A

T

own values

Page 37: Factorial Within Subjects Psy 420 Ainsworth. Factorial WS Designs Analysis Factorial – deviation and computational Power, relative efficiency and sample

Specific Comparisons

F-tests for comparisons are exactly the same as for BG

Except that MSerror is not just MSAS, it is going to be different for every comparison

It is recommended to just calculate this through SPSS

2 2( ) /j j j

error

n w Y wF

MS