You are on page 1of 8

Analysis of Covariance

• Combines linear regression and ANOVA


• Can be used to compare g treatments, after
controlling for quantitative factor believed to be
related to response (e.g. pre-treatment score)
• Can be used to compare regression equations
among g groups (e.g. common slopes and/or
intercepts)
• Model: (X quantitative, Z1,...,Zg-1 dummy variables)

E (Y )    X  1Z1     g 1Z g 1
Tests for Additive Model
• Relation for group i (i=1,...,g-1): E(Y)=+X+i
• Relation for group g: E(Y)=+X
• H0: 1=...=g-1=0 (Controlling for covariate, no
differences among treatments)
Interaction Model
• Regression slopes between Y and X are
allowed to vary among groups

E (Y )    X  1Z1     g 1Z g 1   1 XZ1     g 1 XZ g 1

• Group i (i=1,...,g-1): E(Y)=+X+i+iX=(+ i)+(+i)X


• Group g: E(Y)=+X
• No interaction means common slopes: 1=...=g-1=0
Inference in ANCOVA
• Model: E (Y )    X  1Z1     g 1Z g 1   1 XZ1     g 1 XZ g 1
• Construct 3 “sets” of independent variables:
– {X} , {Z1,Z2,...,Zg-1}, {XZ1,...,XZg-1}
• Fit Complete model, containing all 3 sets.
– Obtain SSEC (or, equivalently RC2) and dfC
• Fit Reduced, model containing {X} , {Z1,Z2,...,Zg-1}
– Obtain SSER (or, equivalently RR2) and dfR
• H0:1=...=g-1=0 (No interaction). Test Statistic:
 SSE R  SSEC   RC2  RR2 
 df  df   df  df 
Fobs  R C  R C 

 SSEC  1  RC2 
 df   df 
 C   C 
Inference in ANCOVA
• Test for Group Differences, controlling for covariate
E (Y )     X  1Z1     g 1Z g 1

• Fit Complete, model containing {X} , {Z1,Z2,...,Zg-1}


– Obtain SSEC (or, equivalently RC2) and dfC
• Fit Reduced, model containing {X}
– Obtain SSER (or, equivalently RR2) and dfR
• H0: 1=...=g-1=0 (No group differences) Test Statistic:
 SSE R  SSEC   RC2  RR2 
 df  df   df  df 
Fobs  R C  R C 

 SSEC  1  RC2 
 df   df 
 C   C 
Inference in ANCOVA
• Test for Effect of Covariate controlling for qualitative
variable E (Y )     X   Z     Z
1 1 g 1 g 1

• H0:=0 (No covariate effect) Test Statistic:

b
tobs  ^
b
Adjusted Means
• Goal: Compare the g group means, after
controlling for the covariate
• Unadjusted Means: Y 1 ,..., Y g

' '
• Adjusted Means: Y ,..., Y Obtained by
1 g

evaluating regression equation at X  X


• Comparing adjusted means (based on
regression equation):
' ' ' '
bi  Y  Y
i g bi  b j  Y  Y j
i
Multiple Comparisons of Adjusted Means
• Comparisons of each group with group g:
^
bi  t C / 2, N  g 1  bi i  1,..., g  1

• Comparisons among the other g-1 groups:

^ 2 ^ 2
b  b   t
i j  C / 2 , N  g 1  bi   b j  2COV (bi , b j )

• Variances and covariances are obtained from


computer software packages (SPSS, SAS)

You might also like