CH 2 Multiple Regression S
CH 2 Multiple Regression S
Multiple Regression
(Lec 5-7)
ˆ
u Y 2
i
i 1 2 2i 3 3i
ˆ ˆ X ˆ X
2
min
• Partial derivative
• If we denote: yi Yi Y
x2 i X 2 i X 2
x3i X 3i X 3
x X n X 2
2 2 2
2i 2i
x X n X 3
2 2 2
3i 3i
y Y nY
2 2 2
i i
x x X X nX X
2i 3i 2i 3i 2 3
y x Y X n.Y .X
i 2i i 2i 2
y x Y X n.Y .X
i 3i i 3i 3
Nguyen Thu Hang, BMNV, FTU CS2 9
3. OLS Estimation for the three-variable model
• We will obtain:
ˆ
2 3 2 3 3
2
x x x x
2
2
2
3 2 3
2
y x x x x y x
2
ˆ
3 2 2 3 2
3
x x x x
2
2
2
3 2 3
2
• We obtain
Y 160
i Y 2616i
2
X 50 2i X 274 2
2i
X 60 3i X 390 2
3i
Y 16 Y X 835
i 2i
X2 5 Y X 920
i 3i
X3 6
X X 274 2i 3i
Nguyen Thu Hang, BMNV, FTU CS2 12
3. OLS Estimation for the three-variable model
• and
y Y nY 56
2 2 2
i i
x X nX 24
2 2 2
2i 2i 2
x X nX 30
2 2 2
3i 3i 3
y x Y X nY X 35
i 2i i 2i 2
y x Y X nY X 40
i 3i i 3i 3
x x X X nX X 26
2 i 3i 2i 3i 2 3
Nguyen Thu Hang, BMNV, FTU CS2 13
3. OLS Estimation for the three-variable model
• and ˆ
2 0.2272
ˆ3 1.1363
ˆ1 21.6818
ˆ 1 X 22 x32 X 32 x22 2 X 2 X 3 x2 x3
Var (1 ) ( ) 2
n x x ( x x )2
2
2
3 2 3
2
Var ( ˆ )
x
2
3 2
x x ( x x )
2 2 2 2
2 3 2 3
ˆ
Var ( 3 )
x2
2
2
x2 x3 ( x2 x3 )
2 2 2
• or, equivalently,
2
Var ( ˆ ) se(ˆ2 ) var( ˆ2 )
x (1 r )
2 2 2
2 23
2
Var ( ˆ3 ) se( ˆ3 ) var( ˆ3 )
3 23 )
x 2
(1 r 2
n3
Nguyen Thu Hang, BMNV, FTU CS2 7.4.19 16
Example- Stata output
• Model: wage = f(educ,exper )
. reg wage educ exper
Yˆ uˆ
i 1
i i 0
• An unbiased estimator of 2
: E (2
u ) i /n
u 2
2
i 1
nk nk
RSS / follows
2 2
distribution with df = number of
observations – number of estimated parameters = n-k
Positive ̂ is called the standard error of the regression
(SER) (or Root MSE). SER is an estimator of the standard
deviation of the error term.
Nguyen Thu Hang, BMNV, FTU CS2 20
4. Properties of OLS estimators
2
Var ( ˆ j )
SST j (1 R ) 2
j
TSS /( n 1)
n 1
R 1 (1 R )
2 2
nk
where k = the number of parameters in the model including the
intercept term.
• There
• There
7.9.4
• -
. use "D:\Bai giang\Kinh te luong\datasets\GPA1.DTA", clear
j 0
Two tail |t0|>t(n-k),α/2
j 0
Right tail t0 > t(n-k),α
j 0 j 0
Option 1: t-test
• If the t variable exceeds the critical t value at the designated
level of significance for given df, then you can reject the null
hypothesis; otherwise, you do not reject it
• review
2 . x32 2
Var ( ˆ2 )
x x2
2
2
3 ( x2 x3 ) 2
(1 r ) x
2
2, 3
2
2
. x
2 2
2
Var ( ˆ3 ) 2
x x
2
2
2
3 ( x2 x3 ) 2
(1 r ) x
2
2, 3
2
3
r 2 2
(1 r ) 2
2,3 x x 2
2
2
3
educ .00263
exper .00019406 .00014537
tenure -.0001254 -.00013218 .00046849
_cons -.03570219 -.0042369 .00143314 .53138894
Nguyen Thu Hang, BMNV, FTU CS2 53
Example- Stata output
• We have se(ˆ3 ˆ4 ) 0.029635
t = -4.958 t 0.025,522 2.
Reject H0
Option 2: F-test
• If the F variable exceeds the critical F value at the designated
level of significance for given df, then you can reject the null
hypothesis; otherwise, you do not reject it
2
( ˆ3 ˆ 4 ) ( 3 4 )
F1,n k
ˆ ˆ )
se ( 3 4
. test exper=tenure
( 1) exper - tenure = 0
F( 1, 522) = 24.58
Prob > F = 0.0000
We reject the hypothesis that the two effects are
equal.
Nguyen Thu Hang, BMNV, FTU CS2 57
8.4. Restricted Least Squares: Testing Linear Equality
Restrictions LEC 13
(8.6.4)
•If the t value computed exceeds the critical t value at the chosen
level of significance, we reject the hypothesis of constant returns
to scale;
•Otherwise we do not reject it.
Nguyen Thu Hang, BMNV, FTU CS2 60
8.4. Restricted Least Squares: Testing Linear Equality
Restrictions
General F Testing
•In Exercise 7.19, you were asked to consider the following
demand function for chicken:
lnYt = β1 + β2 lnX2t + β3 lnX3t + β4 lnX4t + β5 ln X5t + ui (8.6.19)
Where Y = per capita consumption of chicken, lb
X2 = real disposable per capita income,$
X3 = real retail price of chicken per lb
X4 = real retail price of pork per lb
X5 = real retail price of beef per lb.
= 10.69
• From the F tables, we find that for 2 and 22 df the 1 percent critical F
value is 5.72.
• Therefore, The Chow test therefore seems to support our earlier hunch
that the savings–income relation has undergone a structural change in
the United States over the period 1970–1995