Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
( XX )b = X y
X1 X1 X1 X 2 X1 y
X = [X1 , X 2 ] so X X = and X y =
X
2 1 X X
2 2
X X
2 y
X1 X1 X1 X 2 b1 X1 y
(XX)b = =
X
2 1 X X
2 2 2
X b X
2 y
X1 X1b1 X 1 X 2b2 X 1 y
X2 X1b1 X 2 X 2b2 X 2 y ==> X 2 X 2b2 X 2 y - X 2 X 1b1
= X2 (y - X1b1 )
4-4/25 Part 4: Partial Regression and Correlation
Partitioned Solution
Direct manipulation of normal equations produces
b2 = (X2X2)-1X2(y - X1b1)
What is this? Regression of (y - X1b1) on X2
If we knew b1, this is the solution for b2.
Important result (perhaps not fundamental). Note the result
if X2X1 = 0.
Useful in theory: Probably
Likely in practice? Not at all.
-1
X1'X1 X1'X2
X 'X
2 1 X2'X2
b2 = [X2’M1X2]-1[X2’M1y].
“We get the same result whether we (1) detrend the other variables
by using the residuals from a regression of them on a constant
and a time trend and use the detrended data in the regression or
(2) just include a constant and a time trend in the regression and
not detrend the data”
Now, follow this through for the case in which X1 is just a constant term,
column of ones.
What are the residuals in a regression on a constant. What is M1?
Note that this produces the result that we can do linear regression on data
in mean deviation form.
CALC;list;Cor(g,pg)$
4 .0 0
3 .5 0
Result = .7696572 3 .0 0
PG
2 .5 0
2 .0 0
CALC;list;cor(gstar,pgstar)$ 1 .5 0
Result = -.6589938 1 .0 0
.5 0
70 80 90 100 110 120
G
y1 X1 d1 0 0 0
X
y2 2 0 d2 0 0 β
ε N may be thousands. I.e., the
α regression has thousands of
variables (coefficients).
yN X N 0 0 0 dN
β
= [X, D] ε
α
= Zδ ε
We desire also to include a separate family effect (7293 of them) for each family. This
requires 7293 dummy variables in addition to the four regressors.
d1d1 0 0
0 d d 0
DD 2 2
...
0 0
dNdN
MD I D(DD) 1 D
M1D 0 0
2
0 M 0
MD D (The dummy variables are orthogonal)
N
0 0 MD
MDi I Ti di (didi ) 1 d = I Ti (1/Ti )did
1 - T1i - T1i ... - T1i
1
- Ti 1 - Ti ... - Ti
1 1
=
... ... ... ...
- 1 - 1
... 1 - T1i
Ti Ti
MDi X i I Ti di (didi ) 1 d X i = I Ti (1/Ti )did X i
X i (1/Ti )di dX i X i (1/Ti )di (Ti x i ) X i di x i
(Ti K) (Ti 1) * (1 K)
X MD X = Ni=1 X iMDi X i ,
X iMDi X i
k,l
T
t=1
i
(x it,k -x i.,k )(x it,l -x i.,l ) (k,l element)
Ti
ai=(1/Ti )Σt=1 (yit -xitb)=ei