Repeated measures ANOVA and Two-Factor (Factorial) ANOVA by abo20752

VIEWS: 293 PAGES: 32

									   Repeated measures ANOVA and
   Two-Factor (Factorial) ANOVA


A. Repeated measures: All participants experience
all of the k levels of the independent variable.
Compare to the t-test for paired samples
B. Factorial ANOVA: Treatment combinations are
applied to different participants
Compare to independent-samples t- test and one-
way ANOVA
Repeated Measures ANOVA

   Here, we partition the within sum of squares
    and the within degrees of freedom.
   In a repeated measures design, differences
    between treatment conditions cannot be due
    to individual differences, so we subtract the
    variance due to participants from the within
    sum of squares, leaving us with a smaller
    error term and, as with the paired samples t-
    test, more power.
A repeated-measures version of the
dating study
               Number of dates
      Participant Soph Jr Sr Person total
      Shane         2    4 6   12
      Eric          1    4 8   13
      Ryan          0    3 9    12
      Zachary       4    1 2     7
      Mathias       3     5 6   14
      Totals       10 17 31 58
The F –ratio in a repeated measures
design
As always, the F – ratio compares the
 variance due to treatments + error to
 the variance due to error.
Therefore, we will compute SS for the
 total set of scores (SSTot), within groups
 (SSW), and between treatments (SSB).
Partitioning or analyzing the within
sum of squares
SSW = SSBetweenSubj + SSError

And SSBetweenSubj = S(P2/ k)- (SX)2 / N

Then, subtract to find SSError:

  SSError = SSW - SSBetweenSubj
The repeated-measures ANOVA
summary table
Source      SS df MS or s2 F   p
 Between Treatments
 Within
    Between subjects
    Error
 Total
Post hoc tests with repeated-
measures ANOVA
Use Tukey’s HSD or Scheffe’s test, but
 with MSerror and dferror rather than
 MSwithin and dfwithin.
Two-way factorial ANOVA


Partitioning the between-groups
      Sum of Squares
The interaction Sum of Squares
The ANOVA summary table

Source           SS df MS F      p
Between
Within
 Between participants/subjects
 Error
Total
Partitioning the between-groups
Sum of Squares
   Cell notation: Rows, columns, and
    interactions
   Factorial design: Fully crossed
   Set up the data so that the groups of
    one variable form rows and the groups
    of the other variable form columns.
Setting up the data

               COLUMN_Variable
                1    2    3_
         | 1 | R1C1 R1C2 R1C3
 ROW |
 Variable| 2 | R2C1 R2C2 R2C3
An example

Number of dates/person this semester:
                 COLUMN___
              1(So)    2(Jr)   3(Sr)_
       1       7 49      2 4      9 81
     (Men)     6 36      3 9    11 121
               7 49      0 0    10 100
ROW            20 134    5 13    30 302
               4 16     12 144 5 25
       2       2 4      14 196 6 36
    (Women) 1 1         15 225 7 49
               7 21     41 565   18 110
    The factorial ANOVA table

Source      SS df MS or s2 F   p
Between cells (Treatment)
 Row (A)
 Column (B)
 R x C (A x B)
Within
Total
SStotal

 Calculate SStotal the same way as for the
  one-way ANOVA:
SStotal = SX2 - (SX)2 / N = 1145 - 1212/ 18
        = 1145 - 14641/18 = 1145 - 813.389
        = 331.611
 Total df = N - 1 = 18 - 1 = 17
SSw

SSw is also computed the same as it was
 for the one-way ANOVA, this time
 computing SS for each R x C cell and
 adding them all together.
SSR1C1= 134 - 202 / 3 = 134 - 400/3 =0.667
SSR1C2= 13 - 52 / 3 = 13 - 25/3 = 4.667
SSR1C3= 302 - 302 / 3 = 302 - 900/3 = 2.000
SSw...

SSR2C1= 21 - 72 / 3 = 21 - 49/3 = 4.667
SSR2C2= 565 - 412 /3 = 565 - 1681/3 =4.667
SSR2C3=110 - 182 / 3 = 110 - 324/3 = 2.000
SSW= 0.667 + 4.667 + 2.000 + 4.667 +
  4.667 + 2.000 = 18.668
 Within df = N - k = 18 - 6 = 12
The factorial ANOVA table

Source        SS     df MS or s2 F   p
Betweencells
 Row
 Column
 RxC
Within        18.668 12
Total        331.611 17
 SS between cells

Compute SSbetween cells the same way you
 computed SSbetween in the one-way
 ANOVA:
SSbetween cells= S[(SXcell)2/ncell] - (SXtotal)2/ N
 = 202 + 52 + 302 + 72 + 412 + 182 - 1212/18
    3      3      3    3      3        3
 = 400+25+900+49+1681+324 - 813.389
                    3
SS between cells

    = 3379 / 3 - 813.389 = 1126.333-813.389
    = 312.944
   Between cells df = k - 1 = 6 - 1 = 5
The factorial ANOVA table

 Source             SS           df MS or s2* F   p
Betweencells 312.944 5
  Row
  Column
  RxC
Within             18.668 12
Total            331.611 17
*SPSS and everyone else in the world uses MS.
SS rows

   Compute SSrows in the same way as
    SSBetween, using the rows as the only
    groups (pretend there are no columns):
    SSrows= S[(SXrow)2/nrow] - (SXtotal)2/ N
    = 552 + 662 - 813.389
      9      9
    = 3025 + 4356 - 813.389 = 6.722
            9
 SS columns

Similarly, find SScolumns using the SSBetween
 formula, using columns as the only
 groups:
SScolumns= S[(SXcolumns)2/ncolumns] - (SXtotal)2/
 N
 = 272 + 462 + 482 - 813.389
    6      6     6
 = 729 + 2116 + 2304 - 813.389 = 44.778
             6
SS row by column interaction

 Compute the SSR x C interaction by
  subtracting both the SSRows and the
  SScolumns from the SSBetween cells:
  SSR x C = SSBetween cells - SSRows - SSColumns
  = 312.944 - 6.722 - 44.778 = 261.444
dfRows = r - 1 (number of rows - 1) = 2-1=1
dfColumns = c - 1 (number of columns - 1)= 2
dfR x C = (r - 1)(c - 1) = (1)(2) = 2
The factorial ANOVA table

Source          SS     df MS or s2 F   p
Betweencells   312.944 5
 Row             6.722 1
 Column         44.778 2
 RxC           261.444 2
Within          18.668 12
Total          331.611 17
    Computing MS or      sW2


Divide each SS by its df:
MSRows = SSRows / dfRows =6.722 / 1 = 6.722
MSCols = SSCols / dfCols = 44.778 / 2 = 22.389
MSR x C= SSRxC / dfRxC = 261.444/2 =
 130.722
MSW = SSW / dfW = 18.668 / 12 = 1.556
The factorial ANOVA table

Source          SS     df MS or s2 F   p
Betweencells   312.944 5
 Row             6.722 1     6.722
 Column         44.778 2 22.389
 RxC           261.444 2 130.722
Within          18.668 12    1.556
Total          331.611 17
F ratios

To compute F ratios, divide each
 MSBetween by MSW:
FRows = MSRows / MSW = 6.722 / 1.556 = 4.32
FCols = MSCols / MSW = 22.389 / 1.556=14.39
FRxC = MSRxC / MSW = 130.722/1.556=84.01
    The factorial ANOVA table

Source          SS     df MS or s2 F    p
Betweencells   312.944 5
 Row             6.722 1     6.722 4.32 >.05
 Column         44.778 2 22.389 14.39 <.05
 RxC           261.444 2 130.722 84.01 <.05
Within          18.668 12    1.556
Total          331.611 17
Interpretation of main effects

   The main effect for rows (gender) was
    not significant. We retain the null
    hypothesis; the difference is due to
    chance.
   The main effect for columns (class) was
    significant. We reject the null
    hypothesis; at least one difference is not
    due to chance. Post hoc comparisons
    are needed next.
Interpretation of interaction effect

   The interaction between gender (rows)
    and class (columns) was significant.
    The effect of class on number of dates
    is different for the two genders.
   A graph of the means shows that the
    most frequent dating for men occurred
    among the seniors, while for women,
    the most frequent dating was among the
    juniors.
Interpreting the interaction...

16                             The two lines are
14                              clearly not parallel,
12                              showing the
10
                    Men
                                interaction.
 8
 6
                    Women      When there is a
 4
                                significant
 2                              interaction, interpret
 0                              the main effects
     So   Jr   Sr               cautiously.
Group comparisons

                  Main effect
                   comparisons
                  Interaction
                   comparisons
                    – By row variable
                    – By column variable

								
To top