Psy 521/621
Fall 2008
Lab 8 Activities
Factorial ANOVA for Independent Groups
Learning Objectives
Learn to conduct and interpret the output of a factorial ANOVA for independent groups in SPSS
Exercise 1:
Vicki was interested in how much time fathers of children with a disability play with their children who are disabled. To address this question, she found 60 fathers in six categories: a) fathers with a male child with no physical or mental disability, b) fathers with a female child with no physical or mental disability, c) fathers with a male physically disabled child, d) fathers with a female physically disabled child, e) fathers with a male mentally retarded child, and f) fathers with a female mentally retarded child.
She asked the fathers to record how many minutes per day they spent playing with their child for five days.
What are the independent variables in this example? Gender and disability.
What’s the dependent variable? Time spent playing with child.
What would we call this factorial ANOVA? A 2 X 3 (two IVs-- gender: male/female; disability: no disability/physical disability/mental disability)
DATAFILE: LESSON 26 EXERCISE FILE 2
Click Analyze
GLM
Univariate.
Move Play to Dependent Variable.
Move Disability Status and Gender to Fixed Factor.
Click Options: move Disability Status, Gender, and Disability Status*Gender to the
Display Means box.
Check Homogeneity tests, descriptive statistics, and estimates of effect size.
Click Continue.
Click Plots. Move Disability to Horizontal Axis and Gender to Separate Lines.
Click Add and Continue.
Click OK.
Univariate Analysis of Variance
Disability
Be twe en-Subjects Fa ctors status of the child
Gender of
Child
1
2
3
1
2
Value Label
Ty pically
Developing
Physic al
Disability
Mental
Retardation
Male
Female
N
20
20
20
29
31
1
Descriptive Statistics
Dependent Variable: play
Dis ability status of Gender of Child
Male
Female
Total
Mean
7.30
6.80
7.05
Std. Deviation
1.829
2.201
1.986
N
10
10
20
Physical Dis ability Male
Female
3.00
3.40
1.563
1.897
10
10
Mental Retardation
Total
Male
3.20
3.22
1.704
1.716
20
9
Female
Total
4.00
3.65
1.612
1.663
11
20
Total Male 4.55
2.613
29
Female 4.71
2.369
31
Total 4.63
2.470
60
Because sample sizes are unequal, these are actually weighted means.
Dependent Variable: play
F
.427
df1
5 df2
54
Sig.
.828
Tests t he null hypothes is that the error variance of the dependent variable is equal across groups.
a.
Design: Int ercept+disable+gender+disable * gender
Tests of Between-Subjects Effects
Dependent Variable: play
Source
Corrected Model
Type III Sum of Squares
182.278
a
Intercept dis able
1276.571
178.579
gender dis able * gender
.763
4.294
Error
Total
177.656
1648.000
Corrected Total 359.933
df
5
1
2
1
2
54
60
59
Mean Square
36.456
1276.571
89.289
.763
2.147
3.290
a. R Squared = .506 (Adjus ted R Squared = .461)
F
11.081
388.025
27.140
.232
.653
Sig.
.000
.000
.000
.632
.525
Partial Eta
Squared
.506
.878
.501
.004
.024
1) What’s the p-value for the main effect of disable? p < .001
2) What’s the p-value for the main effect of gender? p = .632, ns
3) What’s the p-value for the interaction between disable and gender? p = .525, ns
2
3
1. Disa bili ty status of the chil d
Dependent Variable: play
Disability s tatus of the child
Ty pically Developing
Physic al Disability
Mental Ret ardation
Mean
7.050
3.200
3.611
95% Confidenc e Interval
St d. E rror Lower Bound Upper Bound
.406
.406
.408
6.237
2.387
2.794
7.863
4.013
4.428
2. Gender of Child
Dependent Variable: play
Gender of Child
Male
Female
Mean
4.507
4.733
95% Confidence Interval
Std. Error Lower Bound Upper Bound
.337
3.831
5.184
.326
4.080
5.387
3. Disability status of the child * Gender of Child
Dependent Variable: play
Dis ability status of the child
Typically Developing
Physical Disability
Mental Retardation
Gender of Child
Male
Female
Male
Female
Male
Female
Mean
7.300
6.800
3.000
3.400
3.222
4.000
95% Confidence Interval
Std. Error Lower Bound Upper Bound
.574
.574
.574
.574
.605
.547
6.150
5.650
1.850
2.250
2.010
2.904
8.450
7.950
4.150
4.550
4.434
5.096
Estimated Marginal Means of play
8
Gender of Child
Male
Female
7
6
5
4
3
Typically Developing Physical Disability Mental Retardation
Disability status of the child
4
Because the main effect for Disability is significant, we will conduct follow-up analyses.
Go to Analyze
GLM
Univariate.
The appropriate options are already selected in the Univariate box (otherwise we would repeat what we did above).
Go to Post Hoc.
Click Disability and move it to Post Hoc Tests. Because Levene’s test is non-significant, select Tukey and Bonferroni (if Levene’s test was significant we would choose Dunnett’s
C, Games Howell, or one of the other post hocs that don’t assume equal variance).
Click Continue and OK.
Question: the main effect for gender was not significant, but if it was, would we run post hoc tests? Why or why not?
Di sabi lity status of the child
Dependent Variable: play
Disability s tatus of the child
Ty pically Developing
Physic al Disability
Mental Ret ardation
Mean
7.050
3.200
3.611
95% Confidenc e Interval
St d. E rror Lower Bound Upper Bound
.406
.406
.408
6.237
2.387
2.794
7.863
4.013
4.428
Multiple Comparisons
Dependent Variable: play
Tukey HSD
Bonferroni
(I) Disability status of the child
Typically Developing
Physical Disability
Mental Retardation
Typically Developing
Physical Disability
Mental Retardation
(J) Dis ability status of the child
Physical Disability
Mental Retardation
Typically Developing
Mental Retardation
Typically Developing
Physical Disability
Physical Disability
Mental Retardation
Typically Developing
Mental Retardation
Typically Developing
Physical Disability
Based on observed means.
*. The mean difference is s ignificant at the .05 level.
Mean
Difference
(I-J)
3.85*
3.40*
-3.85*
-.45
-3.40*
.45
3.85*
3.40*
-3.85*
-.45
-3.40*
.45
Std. Error
.574
.574
.574
.574
.574
.574
.574
.574
.574
.574
.574
.574
Sig.
.000
.000
.000
.714
.000
.714
.000
.000
.000
1.000
.000
1.000
95% Confidence Interval
Lower Bound Upper Bound
2.47
5.23
2.02
-5.23
-1.83
-4.78
-.93
2.43
1.98
-5.27
-1.87
-4.82
-.97
.97
-1.98
1.87
4.78
-2.47
.93
-2.02
1.83
5.27
4.82
-2.43
5
12 pl ay
Disability s tatus of the child
Physic al Disability
Mental Ret ardation
Ty pically Developing
Sig.
N
20
20
20
Subset
1
3.20
3.65
2
.714
7.05
1.000
Means for groups in homogeneous subs ets are displayed.
Based on Type III S um of S quares
The error term is Mean Square(Error) = 3.290.
a. Us es Harmonic Mean S ample S ize = 20.000.
b. Alpha = .05.
If we wanted to display all of the data, we would go to Graphs: Boxplot: Select Clustered and Summaries for Groups of Cases. Click Define. Move Play to Variable, Disability to
Category Axis, and Gender to Define Clusters By. Click OK.
Gender of Child
Male
Female
10
8
6
4
2
0
Typically Developing Physical Disability Mental Retardation
Disability status of the child
Summary of what we’ve found:
*Main effect for gender is not significant: The difference in amount of time fathers spend playing with male versus female children is not significant.
*Main effect for disability is significant: There are significant differences in the amount of play time fathers spend with their children depending on disability status.
From the post hoc analyses: Fathers spend significantly more time with typically developing children than with children who are physically disabled or mentally retarded. The mean amount of play time does not differ significantly based on whether children are mentally retarded or physically disabled.
*Interaction is non-significant: it does not appear that the effect of disability on play time depends on gender.
APA write-up:
A 2X3 factorial ANOVA was conducted to evaluate the effects of level of child disability and gender on fathers’ play time with their children. The interaction between level of child disability and gender on play time was not significant, F (2, 54) = .65, p > .05, partial η 2 = .02. The main effect for gender was also non-significant, F (1, 54) = .23, p >
6
.05, partial η
2
< .01. The main effect for level of disability was significant, F (2, 54) =
27.14, p < .05, partial η
2
= .50. Post hoc analyses using the Bonferroni method to control for Type I error indicate that fathers spent significantly more time with typically developing children ( M = 7.05, SD = 1.99) than with physically disabled children ( M =
3.2, SD = 1.70) or mentally retarded children ( M = 4.63, SD = 2.47). No significant difference in fathers’ play time was found between mentally retarded and physically disabled children.
Exercise 2
An experimenter wanted to investigate simultaneously the effects of two types of reinforcement schedules (random/spaced) and three types of reinforcers
(token/money/food) on the arithmetic problem-solving performance of second-grade students. A sample of 66 second-graders was identified and randomly assigned to each of the six combinations of reinforcement schedules and reinforcers (11 in each condition).
Students study arithmetic problem solving under these six conditions for three weeks, and then took a test over the material they studied. The SPSS data file includes 66 cases and three variables: a factor distinguishing between the two types of reinforcement schedules
(random or spaced), a second factor distinguishing among three types of reinforcers
(token, money, or food) and the dependent variable, an arithmetic problem-solving test.
What are the independent variables? Reinforcement schedule and type of reinforcer.
What is the dependent variable? Test score.
How should we refer to this factorial ANOVA? As a 2 X 3 (reinforcement schedule with two levels-random and spaced; reinforcer with three levels- token, money, food)
DATAFILE: LESSON 26 EXERCISE FILE 1
Click Analyze
GLM
Univariate.
Move Scores to Dependent Variable.
Move Schedule and Reinforcer to Fixed Factor.
Click Options.
Move Reinforcer, Schedule, and Schedule * Reinforcer to the Display Means box.
Check Homogeneity tests, descriptive statistics, and estimates of effect size.
Click continue.
Go to Plots.
Move Schedule to Horizontal Axis and Reinforcer to Separate Lines. Click Add.
Move Reinforcer to Horizontal Axis and Schedule to Separate Lines. Click Add (here we’re creating two graphs so we have two different ways of looking at the interaction).
Click Continue.
Click OK.
Be twe en-S ubj ects Fa ctors reinfor sc hedule
1
2
3
1
2
Value Label tok en money food random spaced
N
22
22
22
33
33
Descriptive Statistics
Dependent Variable: Scores on an arithmetic problem-solving tes t reinfor token schedule random
Mean
19.64
Std. Deviation
5.025
N
11 spaced
Total
26.45
23.05
4.009
5.644
11
22 money random spaced
28.27
37.00
4.756
4.313
11
11 food
Total random
32.64
31.45
6.291
5.279
22
11 spaced
Total
32.27
31.86
2.687
4.109
11
22
Total random spaced
26.45
31.91
7.027
5.681
33
33
Total 29.18
6.910
66
Levene's Test of Equality of Error Variances a
Dependent Variable: Scores on an arithmetic problem-solving tes t
F
1.525
df1
5 df2
60
Sig.
.196
Tests the null hypothesis that the error variance of the dependent variable is equal across groups.
a. Design: Intercept+reinfor+schedule+reinfor * s chedule
7
Tests of Between-Subjects Effects
Dependent Variable: Scores on an arithmetic problem-solving tes t
Source
Corrected Model
Intercept
Type III Sum of Squares
1927.455
a
56204.182
df
5
1 reinfor schedule
1249.182
490.909
2
1 reinfor * schedule 187.364
2
Error
Total
1176.364
59308.000
60
66
Corrected Total 3103.818
65 a. R Squared = .621 (Adjusted R Squared = .589)
Mean Square
385.491
F
19.662
56204.182
2866.674
624.591
490.909
93.682
19.606
31.857
25.039
4.778
What are the p values for:
1) The main effect of reinforcer? p < .001
2) The main effect of schedule of reinforcement? p < .001
3) The interaction between reinforcer and schedule? p = .012
1. reinfor
Dependent Variable: S cores on an arithmet ic problem-s olving test reinfor tok en money food
Mean
23.045
32.636
31.864
95% Confidenc e Interval
St d. E rror Lower Bound Upper Bound
.944
21.157
24.934
.944
30.748
34.525
.944
29.975
33.752
2. schedule
Dependent Variable: Scores on an arithmetic problem-solving tes t
95% Confidence Interval schedule random spaced
Mean
26.455
31.909
Std. Error Lower Bound Upper Bound
.771
24.913
27.996
.771
30.367
33.451
3. reinfor * schedule
Dependent Variable: Scores on an arithmetic problem-solving test reinfor token money food schedule random spaced random spaced random spaced
Mean
19.636
26.455
28.273
37.000
31.455
32.273
95% Confidence Interval
Std. Error Lower Bound Upper Bound
1.335
16.966
22.307
1.335
23.784
29.125
1.335
1.335
1.335
1.335
25.602
34.329
28.784
29.602
30.943
39.671
34.125
34.943
Sig.
.000
.000
.000
.000
.012
Partial Eta
Squared
.621
.979
.515
.294
.137
8
Estimated Marginal Means of Scores on an arithmetic problemsolving test
35 reinfor token money food
30
25
20 random spaced schedule
Main effect of schedule
Estimated Marginal Means of Scores on an arithmetic problemsolving test schedule random spaced
35
30
25
20 token money food reinfor
Main effect of reinforcement type
**Note on interpreting main effects when you have a significant interaction: it does not make sense to interpret main effects when you have a significant disordinal interaction.
An interaction means that the effect of one IV on the DV depends on the level of a second IV. If you interpret the main effect on its own when the interaction is significant, it’s sort of like you are pretending that you didn’t have this information. For example, with this data we would interpret a main effect of reinforcement schedule to mean that participants scored significantly higher on the test when receiving a spaced vs. fixed schedule of reinforcement. However, we can tell that is not true for those individuals in the “food” condition; the means across schedule for this type of reinforcer appear to be nearly equal (this implies that the simple main effect of food is not likely significant).
That said, when interactions are ordinal, the main effects are still worth interpreting.**
9
10
Question: Do we need to conduct follow-up tests for the significant main effect of schedule? Why or why not?
-Nope. This variable only has two levels, i.e., it’s a 1df test, so we know where the action is without any additional tests.
The interaction effect is significant. We could conduct simple main effects, however, those are relatively straightforward and are covered both in class and Green & Salkind.
Therefore we will move onto the slightly more complicated interaction contrasts.
Go to Analyze
General Linear Model
Univariate
Click Paste. The first three rows of the syntax should look like this:
UNIANOVA
test BY schedule reinfor
/METHOD = SSTYPE(3)
Delete all but the first three rows (i.e., those that match the above syntax) and copy/paste:
/lmatrix '(token vs money) for random vs (token vs money) for spaced' schedule*reinfor 1 -1 0 -1 1 0
/lmatrix '(token vs food) for random vs (token vs food) for spaced' schedule*reinfor 1 0 -1 -1 0 1
/lmatrix '(money vs food) for random vs (money vs food) for spaced' schedule*reinfor 0 1 -1 0 -1 1.
Select Run
All.
Note that SPSS is very sensitive to spacing and punctuation!
Let’s look in greater depth at what we’re asking for with each of these contrasts:
/lmatrix '(token vs money) for random vs (token vs money) for spaced' schedule*reinfor 1 -1 0 -1 1 0
--Here we’re comparing the mean difference between token and money for those in the spaced (smiley faces) vs. random (hearts) conditions. So here is what we are computing:
(19.636 – 28.273) – (26.455 – 37.00) = 1.909
3. reinfor * schedule
Dependent Variable: Scores on an arithmetic problem-solving test reinfor token money food schedule random spaced random spaced random spaced
Mean
19.636
26.455
28.273
37.000
31.455
32.273
95% Confidence Interval
Std. Error Lower Bound Upper Bound
1.335
16.966
22.307
1.335
23.784
29.125
1.335
1.335
1.335
1.335
25.602
34.329
28.784
29.602
30.943
39.671
34.125
34.943
What values will be used in the 2 nd
comparison?:
/lmatrix '(token vs food) for random vs (token vs food) for spaced' schedule*reinfor -1 0 1 1 0 -1
(19.636 – 31.455) – (26.455 – 32.273) = -6.01
What values will be used in the 3 rd comparison?
/lmatrix '(money vs food) for random vs (money vs food) for spaced' schedule*reinfor 0 1 -1 0 -1 1.
(28.27 – 31.46) – (37 – 32.27) = -7.91
Contrast Results (K Matrix) a
Contrast
L1 Contrast Es timate
Hypothesized Value
Difference (Estimate - Hypothesized)
Dependent
Variable
Scores on an arithmetic problem-solv ing tes t
1.909
0
1.909
Std. Error
Sig.
95% Confidence Interval for Difference
Lower Bound
Upper Bound
2.670
.477
-3.432
7.250
a. Based on the us er-s pecified contrast coefficients (L') matrix: (token vs money) for random vs (token vs money) for spaced
And look! The value we computed above (1.909) shows up again in our first contrast!
Test Results
Dependent Variable: Scores on an arithmetic problem-solving tes t
Source
Contrast
Sum of
Squares
10.023
df
1
Mean Square
10.023
F
.511
Sig.
.477
Error 1176.364
60 19.606
This interaction contrast is ns. So what does that mean? We fail to reject the null hypothesis that:
μ random,token
– μ random,money
= μ spaced,token
– μ spaced,money
Alternatively, (
μ random,token
– μ random,money
) – (μ spaced,token
– μ spaced,money
) = 0
11
Contrast
L1 Contrast E stimate
Hy pothesiz ed V alue
Difference (Estimat e - Hypothes ized)
Dependent
Variable
Sc ores on an arithmet ic problem-solv ing tes t
-6. 000
0
-6. 000
St d. E rror
Sig.
95% Confidenc e Int erval for Differenc e
Lower Bound
Upper Bound
2.670
.028
-11.341
-.659
a. Based on t he user-spec ified contras t coefficients (L') matrix: (t oken vs food) for random vs (tok en vs food) for spaced
Test Results
Dependent Variable: Scores on an arithmetic problem-solving tes t
Source
Contrast
Sum of
Squares
99.000
df
1
Mean Square
99.000
F
5.049
Sig.
.028
Error 1176.364
60 19.606
We have a significant p value here. So what does that mean? We reject the null that:
μ random,token
– μ random,money
= μ spaced,token
– μ spaced,money
Alternatively, (
μ random,token
– μ random,money
) – (μ spaced,token
– μ spaced,money
) = 0
Contrast
L1 Contrast E stimate
Hy pothesiz ed V alue
Difference (Estimat e - Hypothes ized)
Dependent
Variable
Sc ores on an arithmet ic problem-solv ing tes t
-7. 909
0
-7. 909
St d. E rror 2.670
Sig.
95% Confidenc e Int erval for Differenc e
Lower Bound
Upper Bound
.004
-13.250
-2. 568 a.
Based on t he user-spec ified contras t coefficients (L') matrix: (money vs food) for random vs (money vs food) for spaced
12
13
Test Results
Dependent Variable: Scores on an arithmetic problem-solving tes t
Source
Contrast
Sum of
Squares
172.023
df
1
Mean Square
172.023
F
8.774
Sig.
.004
Error 1176.364
60 19.606
The p-value for this contrast is significant, p = .004.
We reject the null that:
μ random,money
– μ random,food
= μ spaced,money
– μ spaced,food
Alternatively, (μ random,money
– μ random,food
) – (μ spaced,money
– μ spaced,food
) = 0
APA:
A 2X3 ANOVA was conducted to evaluate the effects of three reinforcement conditions
(tokens, money, and food) and two schedule conditions (random and equally spaced) on problem-solving scores. The means and standard deviations are displayed in Table X (not actually displayed). The results of the ANOVA indicated a significant main effect for reinforcement type F (2, 60) = 31.86, p < .05, partial eta squared = .52 (where a spaced schedule was more effective than a random schedule), a significant main effect for schedule type, F (1, 60) = 25.04, p < .05, partial η
2
= .29, and a significant interaction between reinforcement type and schedule type, F (2, 60) = 4.78, p < .05, partial η
2
= .14.
Interaction contrasts were conducted in order to explore the nature of the interaction between reinforcement type and schedule type on problem solving scores. A significant difference was found in the effectiveness of token versus food reinforcement depending on reinforcement schedule, F (1, 60) = 5.05, p < .05, such that token reinforcement was much more effective when a spaced schedule was employed, while food reinforcement was effective regardless of schedule. A significant difference was also found in the effectiveness of monetary versus food reinforcement depending on reinforcement schedule, F (1, 60) = 8.78, p < .05, such that monetary reinforcement was much more effective when a spaced schedule was employed, while food reinforcement was effective regardless of schedule. [You’d also report the nonsignificant interaction contrast.]