Professional Documents
Culture Documents
n
i =1
(x
1i
x
1
)(x
2i
x
2
)
n
i =1
(x
1i
x
1
)
2
n
i =1
(x
2i
x
2
)
2
= 0
Source d.f. Type I SS MS F p-val
reg on x
1
1 198.025 198.025 574.0 0.0001
reg on x
2
after x
1
1 10.125 10.125 29.3 0.0029
error 5 1.725 0.345
corrected total 7 209.875
Source d.f. Type I SS MS F p-val
reg on x
2
1 10.125 10.125 29.3 0.0029
reg on x
1
after x
2
1 198.025 198.025 574.0 0.0001
error 5 1.725 0.345
corrected total 7 209.875
16 / 19
Conclusions:
Generally speaking, for multiple regression, dierent
feeding order results in dierent Type I SS table; i.e.
proc glm model y = x1 x2 compared to
proc glm model y = x2 x1.
If and only if covariates (Xs) are uncorrelated, then the
Type I SS table remain the same regardless of the feeding
order; i.e. the contribution of one variable X
j
(extra SS X
j
explains) does not change no matter if adjusting X
k
to Y
or not (j = k). The opposite scenario: confounding will be
discussed later.
What will not change regardless the feeding order and
relationships of covariates?
j
for all j , SSR, SSE, SSY,
Type III table no matter we use model y = x1 x2 or
model y = x2 x1.
17 / 19
Test Intercept
Variable-added-last test: Test whether
0
is necessary
after tting X
1
, , X
k
in the model.
proc glm model y = x
1
x
2
... x
k
run;
Use t-test for intercept; i.e. use SS(1|x
1
, , x
k
) in test.
Variable-added-in-order test: Test whether
0
alone is
signicant.
F
obs
=
n
Y
2
SSY/(n 1)
Look for SSY in ANOVA table, and use proc mean to get