You are on page 1of 11

' $

Regression on Dummy Variables


A dummy variable is a variable that takes on the value of either
one or zero.

75 ANOVA Model

Yi := annual salary of a teacher


Di := 1 if male Di = 0 if female
Yi = α + βDi + ui , ui ∼ iid(0, σ 2 )
E(Yi |Di = 0) = α
E(Yi |Di = 1) = α+β
α̂ = Ȳf emale β̂ = Ȳmale − Ȳf emale

& %
261
' $

Example 75.1 Regressing Salary on the gender dummy variable:


Ŷi = 18.00 + 3.28 Di , R2 =.8737
(57.74) (7.44)

Female Male
Salary Year Salary Year
17.0 1 20.5 2
17.5 1 21.0 3
18.0 2 21.2 4
18.5 2 21.7 3
19.0 3 22.0 5

& %
262
' $

76 ANOCOVA Model
Let Xi := teaching experience, confounding variable

Yi = α + βDi + γXi + ui , ui ∼ iid(0, σ 2 )


E(Yi |Xi , Di = 0) = α + γXi
E(Yi |Xi , Di = 1) = α + βγXi

Example 76.1 Regressing salary on the gender dummy variable


and experience:
Ŷi = 16.96 + 2.35 Di + .58 Xi , R2 =.9611
(57.72) (6.70) (3.97)
Ŷi = 16.43 + 1.23 Xi R2 =.7115
(20.67) (4.44)

& %
263
' $

77 Many Categories
Let Yi be the time spent on reading
Eji = 1 if ith has education level j, otherwise Eji =0
j =1,2,3 ; elementary, high school, college

Yi = α1 + α2 E2i + α3 E3i + ui , ui ∼ iid(0, σ 2 )


E [Yi |E2i = 0, E3i = 0] = α1
E [Yi |E2i = 1, E3i = 0] = α1 + α2
E [Yi |E2i = 0, E3i = 1] = α1 + α3
αˆ1 = Ȳ1 , αˆ2 = Ȳ2 − Ȳ1 , αˆ3 = Ȳ3 − Ȳ1

& %
264
' $

Remarks:

1. number of dummies = 1 - number of categories

2. intercept measures the mean effect of the base category

3. slopes measure the differential effects of the other categoreis

Example 77.1 Regress Y on E2 and E3 :


Ŷ = 8.20 + 3.80 E2 + 11.80 E3
(7.60) (2.16) (5.84)

Elementary High School College


Male 8,10,12 12, 14 20
Female 5,6 10 20

& %
265
' $

Example 77.2 Seasonal Effects

P rof itst = α1 + α2 D2t + α3 D3t + α4 D4t + βSalest + ut


D2t = 1 if 2nd quarter, 0 otherwise

ˆ its = 6688 + 1323 D2 - 218 D3 + 184 D4 + .038 Sales


P rof
(3.81) (2.07) (-.34) (.28) (3.33)
R2 = .5255

ˆ its = 6517 + 1331 D2 +.039 Sales


P rof
(4.01) (2.70) (3.72)
R2 = .5155

& %
266
' $

78 Comparing Two Regressions

1st group : Yi = λ1 + λ2 Xi + u1i , i = 1, 2, . . . , n1


2nd group : Yi = γ1 + γ2 Xi + u2i , i = 1, 2, . . . , n2
H0 : λ1 = γ1 , λ2 = γ2 ; HA : λ1 6= γ1 , orλ2 6= γ2

Chow Test of Stability

u1i ∼ iid N (0, σ 2 ), u2i ∼ iid N (0, σ 2 ), u1 ⊥ u2

1. Combine the two groups:

Yi = α + βXi + ui , i = 1, 2, . . . , n1 + n2 , ui ∼ iid N (0, σ 2 )


ESSR
=⇒ ∼ χ2
n1 +n2 −k under H0
σ2
& %
267
' $

2. Unrestricted Regressions:

ESS1 ESS2
∼ χ2n1 −k ; ∼ χ2
n2 −k
σ2 σ2
ESS1 + ESS2 ESSU
=⇒ = ∼ χ2
n1 +n2 −2k
σ2 σ2

3. Compute F ratio

(ESSU − ESSR )/k


F = ∼ F (k, n1 + n2 − 2k)
ESSU /(n1 + n2 − 2k)

& %
268
' $

Example 78.1 1946-1963: Savings on income


1946-1963: Ŷ =-1.028 +.1178X ESSR = .5722 df = 16
1946-1954: Ŷ =-0.266 +.0470X ESS1 = .1396 df = 7
1955-1963: Ŷ =-1.750 +.1504X ESS2 = .1931 df = 7
ESSU = ESS1 + ESS2 ESSR − ESSU
=.3327 = .2395

.2395/2
F = = 5.04; F (.05, 2, 14) = 3.74
.3327/14

& %
269
' $

Dummy Variable Approach

1st group : Yi = λ1 + λ2 Xi + u1i , i = 1, 2, . . . , n1


2nd group : Yi = γ1 + γ2 Xi + u2i , i = 1, 2, . . . , n2
Pooled : Yi = α1 + α2 Di + β1 Xi + β2 (Di Xi ) + ui ;
Di = 1 if Group 1, i = 1, . . . , n1 + n2
1st group : Yi = α1 + α2 + (β1 + β2 )Xi + ui
2nd group : Yi = α1 + β1 Xi + ui
H0 : λ1 = γ1 , λ2 = γ2 ; ⇐⇒ α2 = 0, β2 = 0

& %
270
' $

Example 78.2 1946-1963: Savings on income

Ŷ = -1.7502 + 1.4839 D + .1504 X - .1034 DX, ESSU = .3327,


(3.1545) (-3.114) df =14
Ŷ = -1.0821 + .1178 X ESSR =.5722,
˙ df =16

.2395/2
F = = 5.04; F (.05, 2, 14) = 3.74
.3327/14

& %
271

You might also like