Ancova
Ancova
Ancova
Loosely speaking…
BG variation attributed to IV
ANOVA Model F = -----------------------------------------------------
WG variation attributed to
individual differences
BG variation BG variation
attributed to IV + attributed to COV
ANCOVA F = -----------------------------------------------------------------
WG variation attributed + WG variation attributed
to individual differences to COV
Imagine an educational study that compares two types of spelling
instruction. Students from 3rd, 4th and 5th graders are involved,
leading to the following data.
Control Grp Exper. Grp
S1 3rd 75 S2 4th 81 Individual differences (compare
those with same grade & grp)
S3 3rd 74 S4 4th 84 • compare Ss 1-3, 5-7, 2-4, 6-8
S5 4th 78 S6 5th 88 Treatment (compare those with
same grade & different grp)
S7 4th 79 S8 5th 89 compare 5,7 to 2,4
ANCOVA
• considers the covariate (a multivariate analysis)
• separates BG variation into Tx and Cov
• separates WG variation into individual differences and Cov
• F-test of the TX effect while controlling for the Cov, using ind difs
as the error term
• F-test of the Cov effect while controlling for the Tx, using ind difs
as the error term
ANCOVA is the same thing as a semi-partial correlation between
the IV and the DV, correcting the IV for the Covariate
Applying regression and residualization as we did before …
• predict each person’s IV score from their Covariate score
• determine each person’s residual (IV - IV’)
• use the residual in place of the IV in the ANOVA (drop 1 error df)
• The resulting ANOVA tells the relationship between the DV and
IV that is unrelated to the Covariate
OR...
ANCOVA is the same thing as multiple regression using both the
dummy coded IV and the quantitative covariate as
predictors of the DV
• the “b” for each shows the relationship between that predictor
and the DV, controlling the IV for the other predictor
Several things to remember when applying ANCOVA:
• H0: for ANOVA & ANCOVA are importantly different
• ANOVA: No mean difference between the populations
represented by the treatment groups.
• ANCOVA: No mean difference between the populations
represented by the treatment groups, assuming all the
members of both populations have a covariate score equal to
the overall covariate mean of the current sampled groups.
• Don’t treat statistical control as if it were experimental control
•You don’t have all the confounds/covariates in the model, so you
have all the usual problems of “underspecified models”
SSerror for ANCOVA will always be smaller than SSerror for ANOVA
• part of ANOVA error is partitioned into covariate of ANCOVA
SSIV for ANCOVA may be =, < or > than SSIV for ANOVA
• depends on the “direction of effect” of IV & Covariate
• smaller SSerror
• F-tests for Tx and for Grade will be “better” – but still only
“control” for this one covariate (there are likely others)
Case #3: if the Tx & Confounding are “in the same direction”
• eg, the 5th graders get the Tx (that improves performance)
and 3rd graders the Cx
• ANOVA will overestimate the TX effect (combining Tx &
the covariate into the SSIV
• ANCOVA will correct for that overestimation (partitioning
Tx & covariate into separate SS)
• ANOVA SS > ANCOVA SS
IV IV
• smaller SSerror
• Can’t anticipate whether F from ANCOVA or from ANOVA
will be larger – ANCOVA has the smaller numerator & also
the smaller denominator
• F-tests for Tx and for Grade will be “better” – but still only
“control” for this one covariate (there are likely others)
Since we’ve recently learned about plotting …
How do the plots of ANOVA & ANCOVA differ and what do we
learn from each?
Z = Tx1 vs. Cx
Cx = 0 Tx = 1
60
50
y’ = bZ + a
40
Tx
b is our estimate
b of the treatment
30
Cx effect
20
0 10
Here’s a plot of the corresponding 2-group ANCOVA model …
… … with no confounding by “X” for mean Xcen Cx = Tx
So, when we use ANCOVA to hold Xcen constant at 0 we’re not
changing anything, because there is no X confounding to control,
“correct for” or “hold constant.
60
Z = Tx1 vs. Cx
50
Cx = 0 Tx = 1
40
Tx b2 Xcen = X – Xmean
30
b is a good
20
estimate of the
Cx treatment effect
0 10
Z = Tx1 vs. Cx
50
Cx = 0 Tx = 1
40
Tx b2 Xcen = X – Xmean
30
b is our estimate
20
of the treatment
Cx effect
0 10
-20 -10 0 10 20 X
Here’s a plot of the corresponding 2-group ANCOVA model …
… with confounding by “X” for mean Xcen Cx > Tx
When we compare the mean Y of Cx & Tx using ANOVA, we ignore the group
difference/confounding of X – and get a biased estimate of the treatment effect
When we use ANCOVA to compare the groups -- holding Xcen constant at 0 --
we’re controlling for or correcting the confounding and get a better estimate of
the treatment effect. Here the corrected treatment effect is larger than the
uncorrected treatment effect.
60
Z = Tx1 vs. Cx
50
Cx = 0 Tx = 1
40
Tx b2 Xcen = X – Xmean
30
b is our estimate
20
of the treatment
Cx effect
0 10
-20 -10 0 10 20 X
The “regression slope homogeneity assumption” in ANCOVA
You might have noticed that the 2 lines representing the Y-X
relationship for each group in the ANCOVA plots were always
parallel – had the same regression slope.
• these are main effects ANCOVA models that are based on…
• the homogeneity of regression slope assumption
• the reason it is called an “assumption” is that when constructing
the main effects model we don’t check whether or not there is an
interaction, be just build the model without an “interaction term” –
so the lines are parallel (same slope)