PPT

advertisement
Analysis of Covariance,
ANCOVA (GLM2)
Slide 1
Aims
•
•
•
•
When and Why do we use ANCOVA?
Partitioning Variance
Carrying out on PASW/SPSS
Interpretation
– Main Effects
– Covariates
Slide 2
When And Why
• To test for differences between group
means when we know that an extraneous
variable affects the outcome variable.
• Used to control known extraneous
variables.
Slide 3
Advantages of ANCOVA
• Reduces Error Variance
– By explaining some of the unexplained
variance (SSR) the error variance in the model
can be reduced.
• Greater Experimental Control:
– By controlling known extraneous variables, we
gain greater insight into the effect of the
predictor variable(s).
Slide 4
Variance
SST
Total Variance In The Data
SSM
SSR
Improvement Due to the Model
Error in Model
Covariate
Slide 5
SSR
An Example
• We will use Field’s (2009) Viagra example (from
the ANOVA lecture).
– There are several possible confounding variables – e.g.
Partner’s libido, medication.
• We can conduct the same study but measure
partner’s libido over the same time period
following the dose of Viagra.
– Outcome (or DV) = Participant’s libido
– Predictor (or IV) = Dose of Viagra (Placebo, Low & High)
– Covariate = Partner’s libido
Slide 6
Relationships between the IV and
Covariate
Homogeneity of Regression Slopes
Slide 9
Dose
Participant’s
Libido
Partner’s
Libido
Placebo
3.22 (1.79)
3.44 (2.07)
Low Dose
4.88 (1.46)
3.12 (1.73)
High Dose
4.85 (2.12)
2.00 (1.63)
How Does ANCOVA Work?
• Imagine we had just two groups:
– Placebo
– Low Dose
• This paradigm can be expressed as a regression
equation using a dummy coding variable:
Yi  b0  b1Xi
Libidoi  b0  b1Dos ei
Slide 10
Dummy Coding
• Dummy Coding
– Placebo = 0, Low Dose = 1
– When Dose = Placebo, Predicted Libido = mean of
placebo group:
X Placebo  b1  0   b0
X Placebo  b0
– When Dose = Low Dose, Predicted Libido = mean
of Low Dose group:
X
 b  1  b
LowDose
1
0
X LowDose  b1  X Placebo
X LowDose  X Placebo  b1
Slide 11
ANOVA As Regression
• We can run a regression with Libido as the
outcome and the Dose (Placebo or Low) as the
predictor, Note:
– Intercept is the mean of Placebo group
– b for the Dummy Variable is the difference between the
means of the placebo and low dose group (4.88-3.22 =
1.66)
Coefficientsa
Model
1
(Constant)
Dummy Variable 1
(Placebo vs. Low)
a. Dependent Variable: Libido
Slide 12
Unstandardized
Coefficients
B
Std. Error
3.222
.547
1.653
.798
Standardized
Coefficients
Beta
.472
t
5.888
Sig .
.000
2.072
.056
ANCOVA
• ANCOVA extends this basic idea.
• The covariate can be added to the regression
model of the ANOVA.
• To evaluate the effect of the experimental
manipulation controlling for the covariate we enter
the covariate into the model first (think back to
hierarchical regression).
Yi  b0  b1X i  b2Covar iate
Libidoi  b0  b1Dos ei  b2Par tners' Libidoi
Slide 13
To Recap
• To control for the effect of a covariate all we do is
do a multiple regression in which we enter the
covariate in the first step.
• We enter Dose in a second step
• The result is that we see the effect of dose above
and beyond the effect of the covariate.
Coefficientsa
Model
1
2
(Constant)
Partner's Libido
(Constant)
Partner's Libido
Dummy Variable 1
(Placebo vs. Low)
a. Dependent Variable: Libido
Slide 14
Unstandardized
Coefficients
B
Std. Error
.421
.534
.596
.082
-.362
.440
.872
.094
-1.847
.487
Standardized
Coefficients
Beta
1.291
.788
7.293
-.824
9.295
Sig .
.443
.000
.424
.000
-.527
-3.795
.002
.883
t
Dose
Placebo
Low Dose
High Dose
Slide 15
Participant’s Libido
Partner’s Libido
3
2
5
2
2
2
7
2
4
7
5
3
4
4
7
5
4
9
2
6
3
4
4
4
6
4
6
2
8
5
4
1
5
1
2
2
7
4
5
5
3
1
2
2
6
4
2
1
3
5
4
3
3
2
0
1
3
0
1
0
5
4
3.22
4.88
4.85
Low
High
1.66
3
2
1
0
Placebo
Slide 16
ANCOVA on SPSS
Slide 17
Contrasts
Slide 18
Options
Slide 19
Without the Covariate
Tests of Between-Subjects Effects
Dependent Variable: Libido
Source
Corrected Model
Intercept
DOSE
Error
Total
Corrected Total
Type III Sum
of Squares
16.844a
535.184
16.844
94.123
683.000
110.967
df
2
1
2
27
30
29
Mean Square
8.422
535.184
8.422
3.486
a. R Squared = .152 (Adjusted R Sq uared = .089)
Slide 20
F
2.416
153.522
2.416
Sig .
.108
.000
.108
Output
Levene's Test of Equality of Error Variancesa
Dependent Variable: Libido
F
5.525
df1
df2
2
27
Sig .
.010
Tests the null hypothesis that the error variance of
the dependent variable is equal across g roups.
a. Design: Intercept+PARTNER+DOSE
Tests of Between-Subjects Effects
Dependent Variable: Libido
Source
Corrected Model
Intercept
PARTNER
DOSE
Error
Total
Corrected Total
Type III Sum
of Squares
34.750a
12.171
17.906
28.337
76.216
683.000
110.967
df
3
1
1
2
26
30
29
Mean Square
11.583
12.171
17.906
14.169
2.931
a. R Squared = .313 (Adjusted R Sq uared = .234)
Slide 21
F
3.952
4.152
6.109
4.833
Sig .
.019
.052
.020
.016
SPSS Output: Contrasts
Slide 22
Output
Slide 23
Unadjusted Means
5
4
3.22
4.88
4.88
4.85
4.85
Low
High
3.22
3
2
1
0
Placebo
Slide 24
The Main Effect
10
8
6
5.15
4.71
2.93
4
2
0
Placebo
Low
High
F(2, 26) = 4.14, p < .05
Slide 25
The Covariate
F(1, 26) = 4.96, p < .05
Slide 26
Download