The additional variation explained the newly-added variables.
3 Types of SS
In a given model, each explanatory variable can be assigned a SS.
We use a specific model
Y∼1+A+B
to illustrate the three types of SS.
Term
Type I SS
Type II SS
Type III SS
A
SSR(A)
SSR(A∣B)
SSR(A∣B,AB)
B
SSR(B∣A)
SSR(B∣A)
SSR(B∣A,AB)
AB
SSR(AB∣A,B)
Yates: no significant interaction is assumed
SSR(AB∣A,B)
Type I SS is sequential. Adding each SS can make up SSR(A,B,AB). R use this as the default. So the ANOVA table in R differs with the sequence of the variables.
Type III SS is unique. Each SS refers to variables added last. SPSS use this as the default.
Type II SS is similar to type III SS, except ignoring the interaction term. Python use this as the default.
For type III, testing main effects (pure A or B) in the presence of an interaction (AB) is a violation of the marginality principle. The principle roughly says that the interaction can only be considered after the main effects are add.
General Linear Test
Definition
It compares two models
Full model, and
Reduced model
where the full model considers all explanatory variables and the reduced model is the one when the null hypothesis holds.
The reduced model is nested in the full model. So the null hypothesis should be like
H0:Rβ=t
where R is a constant matrix with full row rank and t is a constant vector. Here are some examples:
The randomness of SSE(R)−SSE(F) is from Rβ^=R(XTX)−1XTY, while SSE(F) is from (I−X(XTX)−1XT)Y. Can show that these two are uncorrelated, thus independent. So SSE(R)−SSE(F)⊥SSE(F). Therefore,
If H0 is βk=0, it is equivalent to t-test. See here.
Intuitively, the F statistic and t statistic both measure the prediction capability of the pure part of Xk. One sees the reduction of SSE and the other sees the magnitude of bk.
If H0 is β1=⋯=βp−1=0, it is equivalent to ANOVA F-test.
Notes on Interpreting the GLT Results
We often looking to "cannot to reject" when performing a test like this – our goal is to eliminate unnecessary variables. But we have to consider the probability of "fail to reject" which is 1−power. So we have to consider power. See here.
“总之就是,不要轻易丢变量。”
Coefficients of Partial Determination
Definition
It measures the amount of remaining variation explained by a variable given other variables already in the model. The formula is
RYk∣1,…,k−1,k+1,…,q2=SSE(X−k)SSR(Xk∣X−k)
where X−k=(X1,…,Xk−1,Xk+1,…,Xq). Usually use η2 to denote it.
Look at the illustration below. RY2∣12=B+DB.
Relationships with R2
Run
Y∼1+X1+⋯+Xk−1+Xk+1+⋯+Xq
and get the residuals e.
Run
Xk∼1+X1+⋯+Xk−1+Xk+1+⋯+Xq
and get the residuals r.
Then run
e∼r
and get R2 of this model.
Then we have
RYk∣−k2=R2
This is saying that the partial R2 is the normal R2 from a simple linear regression. And we will show later that R2 from a simple linear regression is just the squared correlation between the two variables.
▶
The brief proof
Run e∼r to get the residual u=e−br (no intercept because eˉ=rˉ=0), where b=rerse/sr (r∗∗ is sample correlation, s∗2 is sample variance).
RYk∣−k2=SSE(X−k)SSE(X−k)−SSE(Xall)
By FWL theorem, we have
SSE(Xall)=uTu
Plug in u=e−br we get
uTu=⋯=(n−1)(se2−rer2se2)
Note that SSE(X−k)=(n−1)se2, so RYk∣−k2=rer2.
We will show that rer2=R2 afterwards.
Partial Correlation
Here we give the formal definition. Suppose there are two r.v.s X,Y and a random vector C whose components are linear independent (This ensures that V[C] is reversible). The linear projection of X and Y on C are X and Y respectively. Then the partial correlation between X and Y given C is defined as
rXY⋅C=Corr(X−X,Y−Y)
As in OLS, we are interested in the partial correlation between the dependent variable Y and a specific independent variable Xk given all other independent variables, i.e. rYk∣−k. Below we talk about the partial correlation obtained from sample.
Can show that
RYk∣−k2=rYk⋅−k2
▶
The proof
In simple linear regression Y∼X, we have
R2=SSTSSR=sY2sY^2
and
Y^=b1X=sXrYXsYX
thus
sY^2=rYX2sY2
so finally
R2=rYX2
For example, if 0<rYk∣−k<rYk, then the interpretation is that all other variables partly explains the correlation between Xk and Y.
We will soon talk about the case when 0<rYk<rYk∣−k in Connection of Cor and Partial Cor.
Standardized Regression
Why Needed
Units of β1 and β2 are different, making direct comparison implausible.
When X1 and X2 are dramatically different in magnitudes, the matrix computation will have numerical problems.
Definition
The original model is
Yi=β0+β1Xi1+⋯+βp−1Xi,p−1+εi
with some assumptions.
Let Yˉ be the sample mean of Y, Xˉk be the sample mean of Xk, sY,sXk be the sample standard deviation of Y and Xk. We do the following transformation:
If SSR(X2∣X1)>SSR(X2) then X1 is called a suppressor variable of X2.
The general idea is that a suppressor variable will suppress irrelevant variance of other independent variables. We can say X1 suppresses the noise (the part that has no prediction ability of Y) in X2.