Download presentation
Presentation is loading. Please wait.
Published byPoppy Roberts Modified over 9 years ago
1
1 Psych 5510/6510 Chapter 14 Repeated Measures ANOVA: Models with Nonindependent ERRORs Part 3: Factorial Designs Spring, 2009
2
2 Non-Independence in Factorial Designs: Nested Now we will look at applying these procedures to experiments with more than one independent variable. In the first example one independent variable is whether the stimulus is the letter ‘A’ or ‘B’, the other independent variable is the color of the stimulus letter ‘White’ or ‘Black’. Subjects are nested within both independent variables.
3
3 Design The effects of both independent variables and their interaction are all between-subjects as their effects will occur between subjects.
4
4 Transform to W0 scores This situation is quite simple, we translate the repeated measures into just one score per person which represents conceptually (more or less) their mean score on the two measures.
5
5 Design Now just proceed with the analysis, regressing W on the contrasts that code the independent variables and their interactions, just like you would analyze Y scores.
6
6 Non-Independence in Factorial Designs: Crossed In the next example subjects are crossed with both independent variables.
7
7 Design The effects of both independent variables and their interaction are all within-subjects as their effects will occur within the multiple scores we have for each subject.
8
8 Data
9
9 Contrast Codes We begin by setting up the contrast codes as we normally would for a 2-factor design, in the table below contrast 1 compares white letters with black letters, contrast 2 compares the letter A with the letter B, and contrast 3 does the interaction of letters and colors..
10
10 W Scores All the independent variables are crossed with subjects, so the contrasts will be used to create W scores that will represent the effect of the independent variable on each subject’s scores.
11
11 W 1i : Contrast One (i.e. Color) For example: computing W1 for subject 1 gives us: Which contrasts his or her scores in the two white conditions (5 and 4) with his or her scores in the two black conditions (6 and 3). We will do this for all the subjects, and then analyze their W 1 scores to see if color made a difference.
12
12 W 1i Scores SubjectW 1i (Contrast 1: color) 10 2.5 3 41.5 mean = 0.25
13
13 W 1i Analysis of Contrast 1 Model C: Ŵ 1i = B 0 = 0 Model A: Ŵ 1i = β 0 = μ W If Model A is ‘worthwhile’ then using the mean of W 1 works better as a model than using 0, which tells us that the mean of W 1 is not 0. The mean of W 1 would equal 0 if the null hypothesis were true and color did not have an effect on scores.
14
14 W 1i Analysis of Contrast 1 SSR (reduction in error due to including Color in the model) can be computed using: SSE(A) is simply the SS of the W 1 scores: SSE(A)=(SPSS ‘variance’ of variable W1)*(n-1) = 3.25 SSE(C)=SSE(A)+SSR=3.25+0.25=3.50 PRE = SSR/SSE(C) = 0.07
15
15 W 1i Analysis of Contrast 1 (Color) a) d.f. for a contrast always equals 1, b) d.f. for an interaction is the product of the d.f. of the terms that are interacting. d.f. for the Color contrast = 1, d.f. for Subjects = n – 1, so d.f. error = (1)(n-1) = n – 1 = 3. c)The p value can come from the PRE or F tools, or from doing a t test on W1 for a ‘One-Sample T test’ with a ‘test value’ of zero (on SPSS), which also gives you a t value (the square root of the F) and is a quick alternative if you don’t want the full source table.
16
16 W 2i and W 3i Analysis Do the exact same type of analysis for W 2 (the effect of I.V. “Letter”) and for W 3 (the interaction of “Letter” and “Color”). In each case use the model comparison approach to determine if the mean of the W scores is significantly different than zero.
17
17 Within Subject Source Table The table below combines the analyses of the three contrasts (the real meat...carrot...of the analyses) Note the total SS and df Within S is the sum of its partitions.
18
18 Pooling Error Terms Notice that each contrast has its own unique error term. In the ‘traditional ANOVA’ approach all of the error terms for the contrasts are ‘pooled’ together to make one error term. The disadvantage of pooling the error term is that its validity depends upon a rarely tested assumption that all of those error terms are estimating the same thing.
19
19 Full Source Table
20
20 SS between subjects A W 0 score will be computed for each subject, giving us a single, composite, score for each subject. The SS of these W 0 scores will give us SS between subjects. SS W0 =31.5 df W0 =3
21
21 SS Total SS total is simply the SS of the 16 scores in the experiment: SS = 47 df total is n-1 =16-1=15
22
22 Full Source Table
23
23 Nonindependence in Mixed Designs Now we will turn our attention to the most complicated situation, a factorial design where some independent variables are between-subjects (i.e. subjects are nested) and some independent variables are within subjects (i.e. subjects are crossed).
24
24 Design
25
25 Data
26
26 Between-Subjects Look back at the ‘design’ slide. The IV “Activity” (Passive vs. Active) is a between-subjects treatment. We could simply set up a contrast variable, X = -1 or 1, and regress Y on it, but we have two Y scores per subject and those scores will be nonindependent. Solution: use W 0 to get just one score per subject
27
27 SubjectY list 1Y list 2W0ActivityX 1 78 10.61Passive 2 56 7.78Passive 3 69 10.61Passive 4 76 9.19Passive 5 88 11.31Passive 6 77 9.89Passive 7 56 7.78Passive 8 68 9.89Passive 9 66 8.49Active1 10 56 7.78Active1 11 44 5.66Active1 12 35 5.66Active1 13 45 6.36Active1 14 55 7.07Active1 15 33 4.24Active1 16 35 5.66Active1 W0 gives us 1 score per S, regress W0 on X to see if type of activity had an effect.
28
28 Analysis of IV Activity
29
29 Within-subject Analysis The analysis of the IV “List” (“First” vs “Second”), and the analysis of the interaction between “List” and “Activity” both involve within-subject differences (the interaction involves both within-subject and between- subject differences). To analyze these we will need to use W 1 scores.
30
30 W 1i scores To determine the difference between a subject’s score in the first list with the same subject’s score in the second list we will use a contrast of +1 for the first list, -1 for the second list, and use these deltas for computing each subject’s W 1 score.
31
31 SubjectY list 1Y list 2W0ActivityXW1 1 78 10.61Passive.71 2 56 7.78Passive.71 3 69 10.61Passive2.12 4 76 9.19Passive-.71 5 88 11.31Passive0 6 77 9.89Passive0 7 56 7.78Passive.71 8 68 9.89Passive1.41 9 66 8.49Active10 10 56 7.78Active1.71 11 44 5.66Active10 12 35 5.66Active11.41 13 45 6.36Active1.71 14 55 7.07Active10 15 33 4.24Active10 16 35 5.66Active11.41
32
32 Looking for an effect due to “List” SubjectW1 1.71 2 32.12 4-.71 50 60 7.71 81.41 90 10.71 110 121.41 13.71 140 150 161.41 Mean.57 Note each W 1 score reflects the difference between when the subject was measured in the first list versus when he or she was measured in the second list. Conceptually, the question here is whether the μ of W 1i = 0.
33
33 Looking for an interaction between “List” and “Activity” PassiveActive SubjectW1SubjectW1 1.7190 2 10.71 32.12110 4-.71121.41 5013.71 60140 7.71150 81.41161.41 Mean.62Mean.53 Here are the same W1 scores listed according to ‘Activity’. Remember, W1 measures the effect of ‘List’, if the effect of List depends upon Activity then the two interact, this will be seen in a difference in the means of the W1 scores in the two groups.
34
34 Within-subject Analysis Review the last two slides: 1.The test to determine whether ‘List’ has an effect examines whether the mean of all of the W1 scores differs from zero. 2.The test to determine whether ‘List’ and ‘Activity’ interact examines whether the mean of W1 scores in the ‘Passive’ group differs from the mean of the W1 scores in the ‘Active’ group. 3.Fortunately, we can easily answer both questions at once...
35
35 SubjectY list 1Y list 2W0ActivityXW1 1 78 10.61Passive.71 2 56 7.78Passive.71 3 69 10.61Passive2.12 4 76 9.19Passive-.71 5 88 11.31Passive0 6 77 9.89Passive0 7 56 7.78Passive.71 8 68 9.89Passive1.41 9 66 8.49Active10 10 56 7.78Active1.71 11 44 5.66Active10 12 35 5.66Active11.41 13 45 6.36Active1.71 14 55 7.07Active10 15 33 4.24Active10 16 35 5.66Active11.41 All we need to do is to regress W1 (which measures the effect of ‘List’) on X (which codes ‘Activity’)
36
36 Regressing W1 on X
37
37 Testing for an Effect Due to List If ‘List’ has no effect then the mean of W1 should be zero. When we regress W1 on X we get: Ŵ 1i = β 0 + β 1 X i, now it is interesting to note that X (because it is a contrast) has a mean of zero, and because of this β 0 = μ W1. So we can do the following to see if μ W1 =0. Model C: Ŵ 1i = B 0 + β 1 X i where B 0 = 0 Model A: Ŵ 1i = β 0 + β 1 X i where β 0 = μ W1 H0: β 0 = B 0 or alternatively μ W1 = 0 HA: β 0 B 0 or alternatively μ W1 0
38
38 Model C: Ŵ 1i = B 0 + β 1 X i where B 0 = 0 Model A: Ŵ 1i = β 0 + β 1 X i where β 0 = μ W1 H0: β 0 = B 0 or alternatively μ W1 = 0 HA: β 0 B 0 or alternatively μ W1 0 To ask whether μ W1 = 0 is to ask whether β 0 = 0, and the SPSS printout provides a t test to see whether or not β 0 = 0. t=-3.005, p=.009. So we can conclude that List does indeed have an effect. Ŵ 1i = -.575 +.044X i
39
39 Filling in the Summary Table Ŵ 1i = -.575 +.044X i (see previous slide) Model C: Ŵ 1i = B 0 + β 1 X i = 0 +.044X i PC=1 Model A: Ŵ 1i = β 0 + β 1 X i = -.575 +.044X i PA=2 SSE(A) = SS residual from regressing W1 on X = 8.188 and df=14 (see earlier slide) PRE=SSR/SSE(C)=0.39 MS = SSR/df = 5.29/1 = 5.29 F=t²=-.3005²=9.03 (see previous slide) p=.009 (see previous slide)
40
40 Summary Table for I.V. ‘List’ SourceSSdfMSFPREp SSR (List) 5.291 9.030.39.009 SSE(A) (Error) 8.188140.585 SSE(C) (Total) 13.47815
41
41 Effect Due to List x Activity Interaction To say that “List” and “Activity” do not interact is to say that knowing X does not help predict the value of W 1 (go back to the slide that covers that). So we have: Model C: Ŵ 1i = β 0 Model A: Ŵ 1i = β 0 + β 1 X i Which, of course, is simply the analysis of regressing W1 on X.
42
42 Summary Table for List x Activity Interaction SourceSSdfMSFPREp SSR (List x Activity).0311.0530.004.821 SSE(A) (Error) 8.188140.585 SSE(C) (Total) 8.21915 Taken right off of the SPSS output for regressing W1 on X
43
43 Error Term Note we have the same error term for both the effect due to list and the effect of list by activity interaction. The error term is for the same Model A in both cases and actually represents the List x Activity X Subject interaction..
44
44 Within-Subject Source Table SourceSSdfMSF*PREp List5.291 9.03.39.009 List x Activity.0311.03.053.005.821 Error (List x Activity x S) 8.18814.585 Total Within13.5116
45
45 Final Source Table SourceSSdfMSF*PREp Between Subjects67.7215 Activity 42.781 24.02.63.000 Error between Ss 24.94141.78 Within Subjects13.5116 List 5.291 9.03.39.009 List x Activity.0311.053.005.821 Error (List x Activity x S) 8.18814.585 Total81.2231
46
46 Simple Summary 1) Between subjects contrast: compute the W 0 scores, regress W 0 on the between subjects contrast (X 1 in this example)
47
47 Simple Summary 2)Within subjects contrast, and 3) interaction W 1 represents the within subjects contrast. X 1 represents the between subjects contrast. If we regress W 1 on X 1 we get: Ŵ 1i = -.575 +.044X i Testing to see if b 0 differs from zero tells us if the within subjects contrast is significant, testing to see if b 1 differs from zero tells us if there is an interaction between the within and between subjects variables. SPSS does both of those...
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.