The Analysis of Covariance
Download
Report
Transcript The Analysis of Covariance
The Analysis of Covariance
ANACOVA
Multiple Regression
1. Dependent variable Y (continuous)
2. Continuous independent variables X1, X2, …,
Xp
The continuous independent variables X1, X2, …,
Xp are quite often measured and observed (not set
at specific values or levels)
Analysis of Variance
1. Dependent variable Y (continuous)
2. Categorical independent variables (Factors) A,
B, C,…
The categorical independent variables A, B, C,…
are set at specific values or levels.
Analysis of Covariance
1. Dependent variable Y (continuous)
2. Categorical independent variables (Factors) A,
B, C,…
3. Continuous independent variables (covariates)
X1, X2, …, Xp
Example
1. Dependent variable Y – weight gain
2. Categorical independent variables (Factors)
i. A = level of protein in the diet (High, Low)
ii. B = source of protein (Beef, Cereal, Pork)
3. Continuous independent variables
(covariates)
i.
X1= initial wt. of animal.
Dependent variable is continuous
Statistical Technique
Multiple Regression
ANOVA
ANACOVA
Independent variables
continuous
categorical
×
×
×
×
It is possible to treat categorical independent
variables in Multiple Regression using Dummy
variables.
The Multiple Regression Model
Y 0 1 X1
p X p
The ANOVA Model
Y i j ij
Main Effects
Interactions
The ANACOVA Model
Y i j ij
Main Effects
Interactions
1 X1 1 X1
Covariate Effects
ANOVA Tables
The Multiple Regression Model
Source
S.S.
d.f.
Regression
SSReg
p
Error
SSError
n–p-1
Total
SSTotal
n-1
The ANOVA Model
Source
S.S.
d.f.
A
SSA
a-1
B
SSB
b-1
SSAB
(a – 1)(b – 1)
Main Effects
Interactions
AB
Error
SSError
n–p-1
Total
SSTotal
n-1
The ANACOVA Model
Source
S.S.
d.f.
Covariates
SSCovaraites
p
A
SSA
a-1
B
SSB
b-1
SSAB
(a – 1)(b – 1)
Main Effects
Interactions
AB
Error
SSError
n–p-1
Total
SSTotal
n-1
Example
1. Dependent variable Y – weight gain
2. Categorical independent variables (Factors)
i. A = level of protein in the diet (High, Low)
ii. B = source of protein (Beef, Cereal, Pork)
3. Continuous independent variables
(covariates)
X = initial wt. of animal.
The
data
wtgn
112
126
88
97
91
78
86
83
108
104
42
93
102
77
85
88
82
41
63
88
104
114
78
111
109
115
47
124
80
97
initial wt
1031
1087
890
1089
894
917
972
899
821
846
1041
1108
1132
1023
1090
921
909
1091
838
935
1098
888
1000
993
1043
992
834
1005
905
1059
Level
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
High
Source
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Pork
Pork
Pork
Pork
Pork
Pork
Pork
Pork
Pork
Pork
wtgn
56
86
78
69
76
65
60
80
78
41
68
67
71
76
85
37
119
91
51
57
96
67
85
17
67
54
105
64
92
62
initial wt
1044
1025
878
1193
1024
1078
965
958
1135
847
986
1003
968
1035
1018
882
1053
978
1057
1035
965
1025
970
836
961
931
1017
845
1092
932
Level
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Source
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Beef
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Cereal
Pork
Pork
Pork
Pork
Pork
Pork
Pork
Pork
Pork
Pork
The ANOVA Table
Source
Initial (Covariate)
LEVEL
SOURCE
LEVEL * SOURCE
Error
Total
Sum of Squares
3357.8165
6523.4815
2013.6469
2528.0163
19609.4835
31966.8500
df
1
1
2
2
53
59
Mean Square
3357.82
6523.48
1006.82
1264.01
369.99
F
9.075
17.631
2.721
3.416
Sig.
0.00397
0.0001
0.07499
0.04022
Using SPSS to perform
ANACOVA
The data file
Select AnalyzeGeneral Linear Model Univariate
Choose the Dependent Variable, the Fixed Factor(s) and the
Covaraites
The following ANOVA table appears
Tests of Between-Subjects Effects
Dependent Variable: WTGN
Source
Corrected Model
Intercept
INITIAL
LEVEL
SOURCE
LEVEL * SOURCE
Error
Total
Corrected Total
Type III
Sum of
Squares
12357.366a
24.883
3357.816
6523.482
2013.647
2528.016
19609.484
421265.0
31966.850
df
6
1
1
1
2
2
53
60
59
Mean
Square
2059.561
24.883
3357.816
6523.482
1006.823
1264.008
369.990
a. R Squared = .387 (Adjusted R Sq uared = .317)
F
5.567
.067
9.075
17.631
2.721
3.416
Sig .
.000
.796
.004
.000
.075
.040
The Process of Analysis of Covariance
140
Dependent variable
120
100
80
60
40
700
800
900
1000
1100
Covariate
1200
1300
1400
The Process of Analysis of Covariance
Adjusted Dependent variable
140
120
100
80
60
40
700
800
900
1000
1100
Covariate
1200
1300
1400
• The dependent variable (Y) is adjusted so that
the covariate takes on its average value for
each case
• The effect of the factors ( A, B, etc) are
determined using the adjusted value of the
dependent variable.
• ANOVA and ANACOVA can be handled by
Multiple Regression Package by the use of
Dummy variables to handle the categorical
independent variables.
• The results would be the same.