SlideShare a Scribd company logo
1 of 59
1
DUMMY
VARIABLES
7
LECTURE
Nature of “dummy” variable:
(1)Variables that assume such “1” and “0” values
(2) Variables usually indicates the dichotomized
“presence” or “absence”, “yes” or “no”, etc.
(3) Variables indicates a “quality” or an attribute,
such as “male” or “female”,
“black” or “white”,
“urban” or non-urban”
“before” or “after”
“North” or “south”, “east” or “west”
………..etc.
obs
Male=1
Dummy Female=1
Dummy
Salary(K)
Years of
teaching
1 1 0 23 1
2 0 1 19.5 1
3 1 0 24 2
4 0 1 21 2
5 1 0 25 3
6 0 1 22 3
7 1 0 26.5 4
8 0 1 23.1 4
9 0 1 25 5
10 1 0 28 5
11 1 0 29.5 6
12 0 1 26 6
13 0 1 27.5 7
14 1 0 31.5 7
15 0 1 29 6
16 1 0 22 5
17 0 1 19 2
18 1 0 18 2
19 0 1 21.7 5
20 0 1 18.5 2
21 1 0 21 4
22 1 0 20.5 4
23 0 1 17 1
24 0 1 17.5 1
25 1 0 21.2 5
Separate male sample
obs Starting salary, Y Years of teaching, X2
1 23 1
3 24 2
5 25 3
7 26.5 4
10 28 5
11 29.5 6
14 31.5 7
16 22 5
18 21.7 5
21 21 4
22 20.5 4
25 21.2 5
obs Staring salary, Y Years of teaching, X2
2 19.5 1
4 21 2
6 22 3
8 23.1 4
9 25 5
12 26 6
13 27.5 7
15 29 6
17 19 2
19 18 2
20 18.5 2
23 17 1
24 17.5 1
Separate female sample
10
15
20
25
30
35
0 1 2 3 4 5 6 7 8
Male
Linear (Male)
Salary Y
X
teaching
years
Y = 1 + 2 X (male)
^ ^ ^
Two separate models: Ym = 1 +  2 Xm + um
Yf = ’1 + ’2 Xf + uf
(male)
(female)
Linear (Female)
Female
Y = ’1+ ’2X (female)
^ ^
^
Assuming *2 = 2, same slope but different constant
between Yi and Xi.
1st model: Yi = 1 + *1 Di + 2 Xi + ui
Yi = 1 + *1 Di + 2 Xi + *2 DiXi + ui
Yi = annual salary (each obs.)
Xi = years of teaching experience
Di = 1 if male
= 0 otherwise (female)
control
variable
Assuming *2  2, different slope and different constant
between Yi and Xi.
2nd model:
Salary Y
X
teaching
years
Y = ’1+ ’2X (female)
^ ^ ^
Y = 1 + 2 X (male)
^ ^ ^
0 1 2 3 4 5 6 7 8
Male
Female
Linear (Male)
Linear (Female)
15
20
25
30
35
10
Y = ”1 + ”2 X (whole)
^ ^ ^
Two separate models: Ym = 1 + 2 Xm + um
Yf = ’1 + ’2 Xf + uf
(male)
(female)
D1 + D2 = 1
D1 = 1 - D2
male female
annual
Salary
years of
teaching
obs D2 D1 Y X
1 0 1 23 1
2 1 0 19.5 1
3 0 1 24 2
4 1 0 21 2
5 0 1 25 3
6 1 0 22 3
7 0 1 26.5 4
8 1 0 23.1 4
9 1 0 25 5
10 0 1 28 5
11 0 1 29.5 6
12 1 0 26 6
13 1 0 27.5 7
14 0 1 31.5 7
15 1 0 29 6
16 0 1 22 5
17 1 0 19 2
18 0 1 18 2
19 1 0 21.7 5
20 1 0 18.5 2
21 0 1 21 4
22 0 1 20.5 4
23 1 0 17 1
24 1 0 17.5 1
25 0 1 21.2 5
Each dummy
identify two
different
categories,
but when
sum up two
dummies
it cannot
identify
which is
male or female
Caution in the use of Dummy variables
(Dummy variable trap)
If we introduce two dummy variables in one model to
identify two categories of one qualitative variable such as
Yi = 1+ *1 D1i + **1 D2i + 2 Xi + ui
where D1i = 1 if female
= 0 otherwise
where D2i = 1 if male
= 0 otherwise
This model cannot be estimated because of
perfect collinearity between D1 and D2
 D1 = 1 - D2
or D2 = 1 - D1
or D1 + D2 = 1 ( Perfect collinearity )
Use two dummy variables to identify two different qualitative
categories in one model will be fall into the
“Trap of perfect multi-collinearity”
General rule : To avoid the perfect multicollinearity
If a qualitative variable has “m” categories,
introduce only “m-1” dummy variables.
1
D1 D2 D3 D4 D5 … Dm-1
age
1 10 20 30 40 m
Categories
dummy =>
Qualitative variable
Measure the estimated result for two groups:
Male: ==> Yi = (1 + *1 D2i)+ 2Xi D2i = 1
^ ^ ^ ^
Female: ==> Yi = 1 + 2Xi D2i = 0
^ ^ ^
Now consider different intercepts of two groups:
Model: Yi = 1 + *1 D2i + 2Xi + ui
D2i = 1 if male
= 0 otherwise, (i.e. female)
When a category is assigned the value of zero, this
category is called a control category (or omitted group).
2
In order to test whether there is any difference in
the relationships between two categories
Compare: Yi = 1 + 2Xi
^ ^ ^
Yi = (1 + *1 D)+ 2 Xi
^ ^ ^ ^
If t-statistics is significant in *1, there is
different in constant term.
=>same 2 means two categories of X have the
same relationship with Y
^
^
Check the t-statistics
H0 : *1 = 0
H1 : *1 > 0 or H1 : *1  0
Appropriate test is the t-test on *0
^
Compare the critical tc
(α/2, n-k) and the estimated t*
If t* > tc ==> reject H0 : *1 = 0
Y = 1 + *1Di+ 2 Xi + *2DiXi
^ ^ ^ ^
^
Check
t-statistics
=
This part is
testing the
difference of
intercept
This part is testing
whether any
difference in slope
of two categories
Check
t-statistics
=
Separate Examples for female and male:
Female Male
The two regression results performed differently in slope
and intercept. But are they really statistically different?
We cannot answer from these two separate regression results
unless you test the F*.
Set two dummies for the Example: Table 15.1 +15.5
Yi = ( ’1 +”1D1) +2 Xi
^ ^ ^ ^
= (17.937-1.2810) + 1.561X
D1:Female =1
others = 0
D2:Male =1
others = 0
= (16.656+1.2810) + 1.561X
Yi = (1 + *1 D2)+ 2 Xi
^ ^ ^ ^
Yi = 1 + 2Xi
^ ^ ^
= 17.095+1.608Xi
Whole Sample
D1: Female =1
Male: Y = 1 + 2Xi
^ ^ = 18.689 + 1.373 Xm
Female: Y = (1 + ’1D1)+(2 +’2D1)Xi
^ ^ ^ ^
= 16.255 +1.677 Xf
If D2: Male =1
Female: Y = 1 + 2 Xi
^
^ =16.255 + 1.677 X
Male: Y = (1+ ’1 D2)+(2+ ’2D2)X
^ ^ ^ ^ =18.689 + 1.373 X
One qualitative variable with more than two categories
(Health care) = 1 + ’1 D2 + ’’1 D3 + 2Income + u
(Y) (X)
D2 = 1 if high school education
= 0 otherwise
D3 = 1 if college education
= 0 otherwise
2
Health
care
income
Less than high school education
Y = 1 + 2 X
^ ^ ^
1
^
High school education
Y = (1 + ’1 D2)+ 2X
^ ^ ^ ^
D2 = 1
’1
^
D3 = 1
College education
Y = (1 + 1
” D3)+2 X
^ ^ ^ ^
’’1
^
D2 = 1 High school
= 0 otherwise
D3 = 1 College
= 0 otherwise
=========================================
obs Y X D2 D3
=========================================
1 6.000000 40.00000 0.000000 1.000000
2 3.900000 31.00000 1.000000 0.000000
3 1.800000 18.00000 0.000000 0.000000
4 1.900000 19.00000 0.000000 0.000000
5 7.200000 47.00000 0.000000 1.000000
6 3.300000 27.00000 1.000000 0.000000
7 3.100000 26.00000 1.000000 0.000000
8 1.700000 17.00000 0.000000 0.000000
9 6.400000 43.00000 0.000000 1.000000
10 7.900000 49.00000 0.000000 1.000000
11 1.500000 15.00000 0.000000 0.000000
12 3.100000 25.00000 1.000000 0.000000
13 3.600000 29.00000 1.000000 0.000000
14 2.000000 20.00000 0.000000 0.000000
15 6.200000 41.00000 0.000000 1.000000
=========================================
Less than high school: Yi = -1.2859 + 0.1722 Xi
^
Yi = (-1.2859 - 0.068 ) + 0.1722 Xi
^
= -1.3539 + 0.1722 X
High school:
If t value of D2 is
statistically significant
Yi = (-1.2859 + 0.447 ) + 0.1722 Xi
^
= -0.8389 + 0.1722 Xi
College:
If t value of D3 is
statistically significant
= -1.2859 + 0.1722 X
= -1.2859 + 0.1722 X
If t-test is not
statistically significant
Measuring the estimated results of different groups:
One Qualitative variable with many categories :
Example : An estimate model on three different
age’s medical care expenditure
Yi = 1 + ’1 D1 + ’’1 D2 + 2 Xi + ui
(t-value) (t-value)
where D1 = 1 if 55 > age > 25
= 0 otherwise
D2 = 1 if age > 55
= 0 otherwise
A1 + A2  1
A2 =1
A1 =1
0
25 55
measure the estimated models are :
age below 25 Y = 1 + 2 X
^ ^ ^
Y = (1 + ’1D1)+ 2 X
^ ^ ^ ^
25 < age < 55
age > 55 Y = (1 + ’’1D2)+2 X
^ ^ ^ ^
H0 : ’1 = 0, ’’1 = 0 t1
*
H1 : ’1  0, ’’1  0 t2
*
Compare to tc
(α/2, n-k)
’0
^
Y = ( 1 + ’1)+ 2X
^ ^ ^ ^
^
Y = ( 1+ ”1)+2X
^ ^ ^ ^
’’0
In scatter diagram :
0
^
Y
X
Y = (1 ) + 2 X
^ ^ ^
One Qualitative variable with many categories :
Example : An estimate model on four different age’s
medical care expenditure
Y = 1 + ’1 D1 + ”1 D2 + ”’1 D3 + 2 X + u
where D1 = 1 if age > 55
= 0 otherwise
D2 = 1 if 35 < age  55
= 0 otherwise
D3 = 1 if 15 < age  35
= 0 otherwise
Measure the estimated models are :
age  15 Y = 1 + 2 X
^ ^ ^
15 < age  35 Y = (1 + ’1D3) + 2 X
^ ^ ^ ^
35 < age  55 Y = (1 + ”2D2)+ 2 X
^ ^ ^ ^
age > 55 Y = (1 + ’’’1D1)+ 2 X
^ ^ ^ ^
Two qualitative variables
(Y) Salary = 1 + ’1D1 + ”1 D2 + 2X + u
or Y = 1+ ’1D1+ ”1D2 + 2X + ’2D1*X + ”2D2*X + u’
D1 = 1 if male
= 0 otherwise
sex
D2 = 1 if white
= 0 otherwise race
(1) Mean salary for “non-white” female teacher:
Y = 1 + 2X that is D1 = 0, D2 = 0
^ ^ ^
(2) Mean salary for “non-white” male teacher:
Y = (1 + ’1 D1) + (2+ ’2D1)X that is D1 = 1, D2 = 0
^ ^ ^ ^ ^
(3) Mean salary for “white” female teacher:
Y = (1 + ’’1 D2) + 2 X + ”2D2X that is D1 = 0, D2 = 1
^ ^ ^ ^
(4) Mean salary for “white” male teacher:
Y = (1 + ’1 D1 +”1D2)+ (2+ ’2D1+ ”2D2)X that is D1 = 1,
D2 = 1
^ ^ ^ ^ ^ ^ ^
D = 1 if 1970-1981
= 0 otherwise
(1982-1995)
Different types of dummy regression:
Y = 1 + 2 X + ’1D + ’2D*X
H0 : ’1 = 0 and ’2 = 0
Y = 1 + 2 X + ’1 D + ’2D*X
H0 : ’1 = 0
Y = 1 + 2 X + ’1D + ’2D*X
H0 : ’1  0 and ’2  0
Y = 1 + 2 X + ’1 D + ’2D*X
H0 : ’2 = 0
1.
2
3
4
(1970-1981): Yt = A1 + A2 Xt + u1t
(1982-1995: Yt = B1 + B2 Xt + u2t
Y
X
A1 = B1
1
A2 = B2
Identical regressions
Y
X
A1
1
A2
Parallel regressions
A1  B1, A2 = B2
B2
1
B1
Y
X
A0 = B0
1
B1
Concurrent regressions
A1
1
A0 = B0, A1  B1
Y
X
A0
1
A1
dissimilar regressions
A0  B0, A1  B1
B0
1
B1
Interactive effects between the two qualitative variables
Spending(Y) = 1 + ’1 D1 + ”1 D2 + 2 income(X) + u
D1 = 1 if female
= 0 otherwise
sex
D2 = 1 if college graduate
= 0 otherwise
education
Spending(Y) = 1 + ’1D1 + ”1D2 + ’”1D1*D2 + 2income(X) + u
Interaction effect:
’1 = different effect of being a female
”1= different effect of being a college graduate
”’1 = different effect of being a female with college graduate
Example : how can we test the hypothesis that the gasoline
spending is different between a new car and a used car ?
Let us assume that at the begin mile, there is no
different between used car and new car.
gas spending
miles running
Y
X
0
^
New car Y = 1 + 2 X
^ ^ ^
used car Y = 1+ 2X
^
Y = 1+ (2 +  ’2)X
^ ^ ^ ^
^ ^
The estimated relations are :
used car : Yi = 1 + (2 +  ’2D) Xi where D = 1
^ ^ ^ ^
new car : Yi = 1 + 2 Xi
^ ^ ^
==
Yi = 1 + 2 Xi
==
^ ^ ^
or
If ’2 0, means the estimated slopes for cars is different.
^
Let 2= 2 + ’2 D where D = 1 if used car
= 0 otherwise
Now in one model :
multiplicative
dummy variable
Yi = 1 + (2 + ’2 D) Xi + ui
= 1 + 2 Xi + ’2 D*Xi +ui
= 1 + 2 Xi + ’2 Zi + ui
Test whether  ’2 = 0 or not ?
^
(ii) use t-test on  ’2:Y = 1 +2 Xi +  ’2 Z
^
^ ^ ^ ^
H0 : ’2 = 0
^
H1 : ’2 > 0 Used car is spending more gasoline per mile
^
compare tc
(α, N-3) and t*
If t* > tc
(α, N-3) reject H0
or H1: ’2  0 If t* > tc
(α/2, n-3)  reject Ho
(i) Compare two separate models: (a) Y = 1 + 2 X
(b) Y = ’1 +  2X
^ ^ ^
^ ^ ^
Check the t-value
…...
…...
…...
…...
…...
Y = 1 + 2 Xi + ’2 Zi
obs Yi Xi Di (Di Xi) = Zi
1 210 100 0 0
2 250 110 1 110
3 340 150 1 150
4 305 120 1 120
^ ^ ^ ^
Shifts in both intercept and slope
E = 1 + 2 T + u
E : electricity consumption
T : temperature
To capture effect of seasonal factors
E = 1 + ’1D1 +”1D2 + ’’’1 D3 + 2T + u
where D1 = 1 if winter
0 otherwise
D2 = 1 if spring
0 otherwise
D3 = 1 if summer
0 otherwise
spring summer fall winter
Q1 Q2 Q3 Q4
’’’1
E=(1+ ”’1)+ 2T (Summer)
^
^
^
^
^
1
^
T
E
E = 1 + 2T (Fall)
^ ^
^
E = (1 + ”1) + 2 T (Spring)
^ ^
^
^
’’1
^
E = (1 + ’1) + 2 T (winter)
^ ^ ^
’1
^
^
Measure the basic difference of four seasonal results :
Fall E = 1 + 2 T
^ ^ ^
Spring E = (1 + ”1)+ 2 T
^ ^ ^ ^
Winter E = (1 + ’1)+ 2 T
^ ^ ^ ^
Summer E = ( 1+”’1)+ 2 T
^ ^ ^ ^
Also consider the slope in different seasons
Let *2 = 2 + ’2D1 + ’’2 D2 + ’’’2 D3
Thus, the full general specification is
E = [1+ ’1D1 + ”1D2+ ”’1D3] + 2T + ’2 D1 T + ”2D2 T
+ ”’2D3 T + u Z1 Z2
Z3
Measure the four seasonal results :
Fall E = 1 + 2 T
^ ^ ^
Spring E = (1 + ”1)+(2 + ”1) T
^ ^ ^ ^
^
Winter E = (1 + ’1)+ (2 + ’2) T
^ ^ ^ ^
^
Summer E = ( 1+”’1)+ (2 + ”’2) T
^ ^ ^ ^
^
1
^
T
E
E = 1 + 2T (Fall)
^ ^
^
E = (1 + ’1)+(2 +’2)T(winter)
^ ^ ^ ^ ^
’1
^
E = (1 + ”1)+(2 + ”2)T (Spring)
^
^
^
^
’’1
^
’’’1
E=(1+ ”’1)+(2+ ”’2)T(Summer)
^
^
^
^
^
^
Quarterly effect is same as seasonal effect
D1 = 1 1st Quarter
= 0 otherwise
D2 = 1 2nd Quarter
= 0 otherwise
D3 = 1 3rd Quarter
= 0 otherwise
Control quarter is the 4th quarter
1. Set the seasonal dummy01= 1 if there is the 1st quarter
= 0 otherwise
How
does the
quarterly
dummy
variable
look
like?
Basic model
Yt = 1 + 2 Xt + ut
1974
1960
1989
Define a dummy variable : D = 1 for the period
1974 onward
= 0 otherwise
To test whether the structures of two periods are
different, the specification must assume that
*1 = 1 + ’1 D
*2 = 2 + ’2 D
Dummy regression:
Yt = 1 + ’1 D + 2 Xt + ’2D Xt + ut
(2)
The Chow test on the Unemployment rate-capacity utilization rate
Dependent Var. Constant CAPt R2 F RSS n
_
unemplt 30.0 -0.293 0.761 93.6 17.15 30
(12.1) (9.7) RSSR
^
unemplt 19.64 -0.175 0.59 19.7 4.69 14
(5.9) (4.4) RSS1
^
unemplt 30.63 -0.296 0.871 102.1 3.29 16
(13.1) (10.1) RSS2
^
Note : t-values are in parentheses
H0 : No structural change
H1 : yes
For the unrestricted model :
RSSu = RSS1 + RSS2 = 4.69 + 3.29
= 7.98
F* =
(RSSR - RSSu) / k
RSSu / (T - 2k)
=
(17.15 - 7.98) / 2
7.98 / (30 - 4)
= 14.9
F* > Fc ==> reject H0
Fc
0.01, k, T -2k = Fc
0.01 = 5.53
0.05 0.05, 2, 26 = 3.37
Restriction F-test procedures:
Sample : 1960 - 1989
Dt = 1 1974 to 1980
= 0 prior to 1974
unempl = 19.6 + 11.0 Dt - 0.175 CAPt - 0.121 (Dt*CAPt)
^
(6.7) (2.7) (5.0) (2.5)
R2 = 0.88 SEE = 0.554 F = 72.2 n = 30
_
The estimated of 1974-1980:
unempl = (19.6+11.0) - (0.175+0.121)CAP
= 30.6 - 0.296 CAP
^
^
The estimated of 1960-1973:
unempl = 19.6 - 0.175 CAP
Using the dummy variable to identify the structural change
D = 1 if t  74
= 0 otherwise
Observed data
Year Ut CAPt Dt Dt*CAPt
60 4.20 5.70 0 0
61 0 0
62 0 0
63 0 0
… … ...
68 0 0
69 0 0
70 0 0
71 0 0
72 0 0
73 0 0
74 1
75 1
76 1
77 1
... 1
... 1
... 1
89 1
…
………….……
…
…...….……....
10.5
11.2
10.5
11.2
Ut = 1 + 2 CAPt + ’1Dt + ’2 Dt*CAPt
The estimated models are :
1974 : 1 and onward Y = 1 + 2 X
^ ^ ^
Now the basic model becomes
Yt = 1 + ’1 D + 2 Xt + ’2 D Xt + ut
Yt = 1 + ’1 D + 2 Xt + ’2 X*
t + ut
==>
=== ==
Check t* > 2.0
1974 : 1
1950
1995
Prior to 1974 : 1 Y = ( 1 + ’1D)+(2 + ’2D) X
^ ^ ^ ^ ^
* *
(4)
GENR DUMMY = 1 (sample 1970 - 1980)
GENR DUMMY = 0 (sample 1981 - 1991)
=================================================
obs SAVINGS INCOME DUMMY D*INCOME
=================================================
1970 57.50000 831.0000 1.000000 831.0000
1971 65.40000 893.5000 1.000000 893.5000
1972 59.70000 980.5000 1.000000 980.5000
1973 86.10000 1098.700 1.000000 1098.700
1974 93.40000 1205.700 1.000000 1205.700
1975 100.3000 1307.300 1.000000 1307.300
1976 93.00000 1446.300 1.000000 1446.300
1977 87.90000 1601.300 1.000000 1601.300
1978 107.8000 1807.900 1.000000 1807.900
1979 123.3000 2033.100 1.000000 2033.100
1980 153.8000 2265.400 1.000000 2265.400
1981 191.8000 2534.700 0.000000 0.000000
1982 199.5000 2690.900 0.000000 0.000000
1983 168.7000 2862.500 0.000000 0.000000
1984 222.0000 3154.600 0.000000 0.000000
1985 189.3000 3379.800 0.000000 0.000000
1986 187.5000 3590.400 0.000000 0.000000
1987 142.0000 3802.000 0.000000 0.000000
1988 155.7000 4075.900 0.000000 0.000000
1989 175.6000 4664.200 0.000000 0.000000
1990 175.6000 4664.200 0.000000 0.000000
1991 199.6000 4828.300 0.000000 0.000000
=================================================
Savings = 1 + 2 Income + ’1D + ’2D*Income + u
D = 1 1970--1980
= 0 1981--1991
Estimated for 1970 - 1980 : D = 1
Savings = (1 + ’1) +(2 + ’2) Income
^ ^ ^ ^
1
Estimated for 1981 - 1991 : D = 0
Savings = 1 + 2 Income
^ ^
2
Dummy Regression Results: 1970 - 1991 :
Savings = 217.81 - 203.19 D - 0.010 Income + 0.066 D*Income
(7.96) (-6.19) (-1.39) (4.63)
70 - 80:
Savings = (217.81 - 203.19) + (-0.010 + 0.066) Income
= 14.62 + 0.056 Income
81 - 91:
Savings = 217.81 - 0.010 Income
1970 - 1991 :
Savings = 57.63 + 0.031 Income
(3.86) (5.95)
1970 - 1980 :
Savings = 14.61 + 0.056 Income
(1.40) (7.93)
1981 - 1991 :
Savings = 217.81 + 0.010 Income
(6.16) (-1.08)
Savings = -1.250 + 0.091 Dummy + 0.125 Income
(-3.42) (0.506) (7.04)
LS // Dependent Variable is SAVINGS
Date: 03/02/99 Time: 22:23
Sample: 1946 1963
Number of observations: 18
=====================================================
Variable Coefficient Std. Error t-Statistic. Prob.
=====================================================
C -1.250957 0.364879 -3.428419 0.0037
DUMMY 0.091857 0.181244 0.506816 0.6197
INCOME -0.125655 0.017837 -7.044517 0.0000
=====================================================
R-squared 0.919909 Mean dependent var 0.773333
Adjusted R-squared 0.909230 S.D. dependent var 0.642806
S.E. of likelihood 0.193665 Akaike info criterion -3.132238
Sum squared resid 0.562593 Schwarz criterion -2.983843
Log likelihood 5.649250 F-statistic 86.14326
Durbin-Watson stat 0.976197 Prob(F-statistic) 0.000000
=====================================================
Only consider the difference in intercept
LS // Dependent Variable is SAVINGS
Date: 03/02/99 Time: 22:23
Sample: 1946 1963
Number of observations: 18
=====================================================
Variable Coefficient Std. Error t-Statistic. Prob.
=====================================================
C -1.750172 0.331888 -5.273377 0.0001
DUMMY 1.483923 0.470362 3.154852 0.0070
INCOME 0.150450 0.016286 9.238172 0.0000
DINCOME -0.103422 0.033260 -3.109471 0.0077
=====================================================
R-squared 0.952626 Mean dependent var 0.773333
Adjusted R-squared 0.942475 S.D. dependent var 0.642806
S.E. of likelihood 0.154173 Akaike info criterion -3.546228
Sum squared resid 0.332771 Schwarz criterion -3.348367
Log likelihood 10.37516 F-statistic 93.84109
Durbin-Watson stat 1.468099 Prob(F-statistic) 0.000000
=====================================================
Whether intercept and slope change?
1946 - 1954 : = -0.2662 + 0.047 Income D1 = 1
1955 - 1963 : = -1.750 + 0.150 Income D1 = 0
Savings = -1.750 + 1.483 D + 0.150 Income - 0.103 (Income*D)
(-5.273) (3.154) (9.238) (-3.109)
^
ln Y = 1 + 2 X + ’1 D
(Salary) (years of teaching)
D1 = 1 for male
= 0 otherwise
ln Y = 2.9298 + 0.0546 X2 + 0.1341 D
^
t=(481.5) (48.3) (27.2)
R2 = 0.995 DW = 2.51
exp(0.1341)=1.1435
Exp(0)=1
This means the starting salary of male teacher is higher than the
female teacher by 14.35 percent.
The estimated male teacher salary :
ln Y = (2.9298 + 0.1341) + 0.0546 X
ln Y = 3.0639 + 0.0546 X
^
^

More Related Content

Similar to Nature of "dummy

Inequality and absolute value
Inequality and absolute valueInequality and absolute value
Inequality and absolute valueRushabh Vora
 
functionalform2up.pdf
functionalform2up.pdffunctionalform2up.pdf
functionalform2up.pdfDaniel181688
 
Top Schools in delhi NCR
Top Schools in delhi NCRTop Schools in delhi NCR
Top Schools in delhi NCREdhole.com
 
Ecuaciones diferenciales c1
Ecuaciones diferenciales c1Ecuaciones diferenciales c1
Ecuaciones diferenciales c1Yuliyamira
 
ISI MSQE Entrance Question Paper (2013)
ISI MSQE Entrance Question Paper (2013)ISI MSQE Entrance Question Paper (2013)
ISI MSQE Entrance Question Paper (2013)CrackDSE
 
Per de matematica listo.
Per de matematica listo.Per de matematica listo.
Per de matematica listo.nohelicordero
 
Basic concepts of curve fittings
Basic concepts of curve fittingsBasic concepts of curve fittings
Basic concepts of curve fittingsTarun Gehlot
 
math online kumustahan.pptx
math online kumustahan.pptxmath online kumustahan.pptx
math online kumustahan.pptxJohnleoClaus2
 
01. Differentiation-Theory & solved example Module-3.pdf
01. Differentiation-Theory & solved example Module-3.pdf01. Differentiation-Theory & solved example Module-3.pdf
01. Differentiation-Theory & solved example Module-3.pdfRajuSingh806014
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)CrackDSE
 
Differential equations
Differential equationsDifferential equations
Differential equationsDawood Aqlan
 

Similar to Nature of "dummy (20)

Econometric lec3.ppt
Econometric  lec3.pptEconometric  lec3.ppt
Econometric lec3.ppt
 
Implicit differentiation
Implicit differentiationImplicit differentiation
Implicit differentiation
 
Inequality and absolute value
Inequality and absolute valueInequality and absolute value
Inequality and absolute value
 
Statistics lesson 2
Statistics lesson 2Statistics lesson 2
Statistics lesson 2
 
Ch01_03.ppt
Ch01_03.pptCh01_03.ppt
Ch01_03.ppt
 
DIFFERENTIAL EQUATION
DIFFERENTIAL EQUATIONDIFFERENTIAL EQUATION
DIFFERENTIAL EQUATION
 
Tut 1
Tut 1Tut 1
Tut 1
 
functionalform2up.pdf
functionalform2up.pdffunctionalform2up.pdf
functionalform2up.pdf
 
Top Schools in delhi NCR
Top Schools in delhi NCRTop Schools in delhi NCR
Top Schools in delhi NCR
 
Ecuaciones diferenciales c1
Ecuaciones diferenciales c1Ecuaciones diferenciales c1
Ecuaciones diferenciales c1
 
ISI MSQE Entrance Question Paper (2013)
ISI MSQE Entrance Question Paper (2013)ISI MSQE Entrance Question Paper (2013)
ISI MSQE Entrance Question Paper (2013)
 
Chapter14
Chapter14Chapter14
Chapter14
 
Per de matematica listo.
Per de matematica listo.Per de matematica listo.
Per de matematica listo.
 
Basic concepts of curve fittings
Basic concepts of curve fittingsBasic concepts of curve fittings
Basic concepts of curve fittings
 
math online kumustahan.pptx
math online kumustahan.pptxmath online kumustahan.pptx
math online kumustahan.pptx
 
01. Differentiation-Theory & solved example Module-3.pdf
01. Differentiation-Theory & solved example Module-3.pdf01. Differentiation-Theory & solved example Module-3.pdf
01. Differentiation-Theory & solved example Module-3.pdf
 
Sect1 1
Sect1 1Sect1 1
Sect1 1
 
160280102021 c2 aem (2)
160280102021 c2 aem (2)160280102021 c2 aem (2)
160280102021 c2 aem (2)
 
ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)ISI MSQE Entrance Question Paper (2008)
ISI MSQE Entrance Question Paper (2008)
 
Differential equations
Differential equationsDifferential equations
Differential equations
 

Recently uploaded

Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services  9892124323 | ₹,4500 With Room Free DeliveryMalad Call Girl in Services  9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free DeliveryPooja Nehwal
 
03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptxFinTech Belgium
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...Call Girls in Nagpur High Profile
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfGale Pooley
 
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130  Available With RoomVIP Kolkata Call Girl Serampore 👉 8250192130  Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Roomdivyansh0kumar0
 
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...Henry Tapper
 
Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spiritegoetzinger
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdfAdnet Communications
 
Dividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxDividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxanshikagoel52
 
VIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service ThaneVIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service ThaneCall girls in Ahmedabad High profile
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Pooja Nehwal
 
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsHigh Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfGale Pooley
 
Lundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfLundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfAdnet Communications
 
OAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptx
OAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptxOAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptx
OAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptxhiddenlevers
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
20240417-Calibre-April-2024-Investor-Presentation.pdf
20240417-Calibre-April-2024-Investor-Presentation.pdf20240417-Calibre-April-2024-Investor-Presentation.pdf
20240417-Calibre-April-2024-Investor-Presentation.pdfAdnet Communications
 

Recently uploaded (20)

Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services  9892124323 | ₹,4500 With Room Free DeliveryMalad Call Girl in Services  9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free Delivery
 
03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdf
 
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024
 
Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024
 
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130  Available With RoomVIP Kolkata Call Girl Serampore 👉 8250192130  Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Room
 
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
letter-from-the-chair-to-the-fca-relating-to-british-steel-pensions-scheme-15...
 
Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spirit
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
 
Dividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxDividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptx
 
VIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service ThaneVIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
 
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsHigh Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
High Class Call Girls Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdf
 
Lundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfLundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdf
 
OAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptx
OAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptxOAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptx
OAT_RI_Ep19 WeighingTheRisks_Apr24_TheYellowMetal.pptx
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
20240417-Calibre-April-2024-Investor-Presentation.pdf
20240417-Calibre-April-2024-Investor-Presentation.pdf20240417-Calibre-April-2024-Investor-Presentation.pdf
20240417-Calibre-April-2024-Investor-Presentation.pdf
 

Nature of "dummy

  • 2.
  • 3. Nature of “dummy” variable: (1)Variables that assume such “1” and “0” values (2) Variables usually indicates the dichotomized “presence” or “absence”, “yes” or “no”, etc. (3) Variables indicates a “quality” or an attribute, such as “male” or “female”, “black” or “white”, “urban” or non-urban” “before” or “after” “North” or “south”, “east” or “west” ………..etc.
  • 4. obs Male=1 Dummy Female=1 Dummy Salary(K) Years of teaching 1 1 0 23 1 2 0 1 19.5 1 3 1 0 24 2 4 0 1 21 2 5 1 0 25 3 6 0 1 22 3 7 1 0 26.5 4 8 0 1 23.1 4 9 0 1 25 5 10 1 0 28 5 11 1 0 29.5 6 12 0 1 26 6 13 0 1 27.5 7 14 1 0 31.5 7 15 0 1 29 6 16 1 0 22 5 17 0 1 19 2 18 1 0 18 2 19 0 1 21.7 5 20 0 1 18.5 2 21 1 0 21 4 22 1 0 20.5 4 23 0 1 17 1 24 0 1 17.5 1 25 1 0 21.2 5
  • 5. Separate male sample obs Starting salary, Y Years of teaching, X2 1 23 1 3 24 2 5 25 3 7 26.5 4 10 28 5 11 29.5 6 14 31.5 7 16 22 5 18 21.7 5 21 21 4 22 20.5 4 25 21.2 5
  • 6. obs Staring salary, Y Years of teaching, X2 2 19.5 1 4 21 2 6 22 3 8 23.1 4 9 25 5 12 26 6 13 27.5 7 15 29 6 17 19 2 19 18 2 20 18.5 2 23 17 1 24 17.5 1 Separate female sample
  • 7. 10 15 20 25 30 35 0 1 2 3 4 5 6 7 8 Male Linear (Male) Salary Y X teaching years Y = 1 + 2 X (male) ^ ^ ^ Two separate models: Ym = 1 +  2 Xm + um Yf = ’1 + ’2 Xf + uf (male) (female) Linear (Female) Female Y = ’1+ ’2X (female) ^ ^ ^
  • 8. Assuming *2 = 2, same slope but different constant between Yi and Xi. 1st model: Yi = 1 + *1 Di + 2 Xi + ui Yi = 1 + *1 Di + 2 Xi + *2 DiXi + ui Yi = annual salary (each obs.) Xi = years of teaching experience Di = 1 if male = 0 otherwise (female) control variable Assuming *2  2, different slope and different constant between Yi and Xi. 2nd model:
  • 9. Salary Y X teaching years Y = ’1+ ’2X (female) ^ ^ ^ Y = 1 + 2 X (male) ^ ^ ^ 0 1 2 3 4 5 6 7 8 Male Female Linear (Male) Linear (Female) 15 20 25 30 35 10 Y = ”1 + ”2 X (whole) ^ ^ ^ Two separate models: Ym = 1 + 2 Xm + um Yf = ’1 + ’2 Xf + uf (male) (female)
  • 10. D1 + D2 = 1 D1 = 1 - D2 male female annual Salary years of teaching obs D2 D1 Y X 1 0 1 23 1 2 1 0 19.5 1 3 0 1 24 2 4 1 0 21 2 5 0 1 25 3 6 1 0 22 3 7 0 1 26.5 4 8 1 0 23.1 4 9 1 0 25 5 10 0 1 28 5 11 0 1 29.5 6 12 1 0 26 6 13 1 0 27.5 7 14 0 1 31.5 7 15 1 0 29 6 16 0 1 22 5 17 1 0 19 2 18 0 1 18 2 19 1 0 21.7 5 20 1 0 18.5 2 21 0 1 21 4 22 0 1 20.5 4 23 1 0 17 1 24 1 0 17.5 1 25 0 1 21.2 5 Each dummy identify two different categories, but when sum up two dummies it cannot identify which is male or female
  • 11. Caution in the use of Dummy variables (Dummy variable trap) If we introduce two dummy variables in one model to identify two categories of one qualitative variable such as Yi = 1+ *1 D1i + **1 D2i + 2 Xi + ui where D1i = 1 if female = 0 otherwise where D2i = 1 if male = 0 otherwise This model cannot be estimated because of perfect collinearity between D1 and D2  D1 = 1 - D2 or D2 = 1 - D1 or D1 + D2 = 1 ( Perfect collinearity )
  • 12. Use two dummy variables to identify two different qualitative categories in one model will be fall into the “Trap of perfect multi-collinearity” General rule : To avoid the perfect multicollinearity If a qualitative variable has “m” categories, introduce only “m-1” dummy variables. 1 D1 D2 D3 D4 D5 … Dm-1 age 1 10 20 30 40 m Categories dummy => Qualitative variable
  • 13. Measure the estimated result for two groups: Male: ==> Yi = (1 + *1 D2i)+ 2Xi D2i = 1 ^ ^ ^ ^ Female: ==> Yi = 1 + 2Xi D2i = 0 ^ ^ ^ Now consider different intercepts of two groups: Model: Yi = 1 + *1 D2i + 2Xi + ui D2i = 1 if male = 0 otherwise, (i.e. female) When a category is assigned the value of zero, this category is called a control category (or omitted group). 2
  • 14. In order to test whether there is any difference in the relationships between two categories Compare: Yi = 1 + 2Xi ^ ^ ^ Yi = (1 + *1 D)+ 2 Xi ^ ^ ^ ^ If t-statistics is significant in *1, there is different in constant term. =>same 2 means two categories of X have the same relationship with Y ^ ^ Check the t-statistics
  • 15. H0 : *1 = 0 H1 : *1 > 0 or H1 : *1  0 Appropriate test is the t-test on *0 ^ Compare the critical tc (α/2, n-k) and the estimated t* If t* > tc ==> reject H0 : *1 = 0 Y = 1 + *1Di+ 2 Xi + *2DiXi ^ ^ ^ ^ ^ Check t-statistics = This part is testing the difference of intercept This part is testing whether any difference in slope of two categories Check t-statistics =
  • 16. Separate Examples for female and male: Female Male The two regression results performed differently in slope and intercept. But are they really statistically different? We cannot answer from these two separate regression results unless you test the F*.
  • 17. Set two dummies for the Example: Table 15.1 +15.5 Yi = ( ’1 +”1D1) +2 Xi ^ ^ ^ ^ = (17.937-1.2810) + 1.561X D1:Female =1 others = 0 D2:Male =1 others = 0 = (16.656+1.2810) + 1.561X Yi = (1 + *1 D2)+ 2 Xi ^ ^ ^ ^
  • 18. Yi = 1 + 2Xi ^ ^ ^ = 17.095+1.608Xi Whole Sample
  • 19. D1: Female =1 Male: Y = 1 + 2Xi ^ ^ = 18.689 + 1.373 Xm Female: Y = (1 + ’1D1)+(2 +’2D1)Xi ^ ^ ^ ^ = 16.255 +1.677 Xf
  • 20. If D2: Male =1 Female: Y = 1 + 2 Xi ^ ^ =16.255 + 1.677 X Male: Y = (1+ ’1 D2)+(2+ ’2D2)X ^ ^ ^ ^ =18.689 + 1.373 X
  • 21. One qualitative variable with more than two categories (Health care) = 1 + ’1 D2 + ’’1 D3 + 2Income + u (Y) (X) D2 = 1 if high school education = 0 otherwise D3 = 1 if college education = 0 otherwise 2
  • 22. Health care income Less than high school education Y = 1 + 2 X ^ ^ ^ 1 ^ High school education Y = (1 + ’1 D2)+ 2X ^ ^ ^ ^ D2 = 1 ’1 ^ D3 = 1 College education Y = (1 + 1 ” D3)+2 X ^ ^ ^ ^ ’’1 ^
  • 23. D2 = 1 High school = 0 otherwise D3 = 1 College = 0 otherwise ========================================= obs Y X D2 D3 ========================================= 1 6.000000 40.00000 0.000000 1.000000 2 3.900000 31.00000 1.000000 0.000000 3 1.800000 18.00000 0.000000 0.000000 4 1.900000 19.00000 0.000000 0.000000 5 7.200000 47.00000 0.000000 1.000000 6 3.300000 27.00000 1.000000 0.000000 7 3.100000 26.00000 1.000000 0.000000 8 1.700000 17.00000 0.000000 0.000000 9 6.400000 43.00000 0.000000 1.000000 10 7.900000 49.00000 0.000000 1.000000 11 1.500000 15.00000 0.000000 0.000000 12 3.100000 25.00000 1.000000 0.000000 13 3.600000 29.00000 1.000000 0.000000 14 2.000000 20.00000 0.000000 0.000000 15 6.200000 41.00000 0.000000 1.000000 =========================================
  • 24. Less than high school: Yi = -1.2859 + 0.1722 Xi ^ Yi = (-1.2859 - 0.068 ) + 0.1722 Xi ^ = -1.3539 + 0.1722 X High school: If t value of D2 is statistically significant Yi = (-1.2859 + 0.447 ) + 0.1722 Xi ^ = -0.8389 + 0.1722 Xi College: If t value of D3 is statistically significant = -1.2859 + 0.1722 X = -1.2859 + 0.1722 X If t-test is not statistically significant Measuring the estimated results of different groups:
  • 25. One Qualitative variable with many categories : Example : An estimate model on three different age’s medical care expenditure Yi = 1 + ’1 D1 + ’’1 D2 + 2 Xi + ui (t-value) (t-value) where D1 = 1 if 55 > age > 25 = 0 otherwise D2 = 1 if age > 55 = 0 otherwise A1 + A2  1 A2 =1 A1 =1 0 25 55
  • 26. measure the estimated models are : age below 25 Y = 1 + 2 X ^ ^ ^ Y = (1 + ’1D1)+ 2 X ^ ^ ^ ^ 25 < age < 55 age > 55 Y = (1 + ’’1D2)+2 X ^ ^ ^ ^ H0 : ’1 = 0, ’’1 = 0 t1 * H1 : ’1  0, ’’1  0 t2 * Compare to tc (α/2, n-k)
  • 27. ’0 ^ Y = ( 1 + ’1)+ 2X ^ ^ ^ ^ ^ Y = ( 1+ ”1)+2X ^ ^ ^ ^ ’’0 In scatter diagram : 0 ^ Y X Y = (1 ) + 2 X ^ ^ ^
  • 28. One Qualitative variable with many categories : Example : An estimate model on four different age’s medical care expenditure Y = 1 + ’1 D1 + ”1 D2 + ”’1 D3 + 2 X + u where D1 = 1 if age > 55 = 0 otherwise D2 = 1 if 35 < age  55 = 0 otherwise D3 = 1 if 15 < age  35 = 0 otherwise
  • 29. Measure the estimated models are : age  15 Y = 1 + 2 X ^ ^ ^ 15 < age  35 Y = (1 + ’1D3) + 2 X ^ ^ ^ ^ 35 < age  55 Y = (1 + ”2D2)+ 2 X ^ ^ ^ ^ age > 55 Y = (1 + ’’’1D1)+ 2 X ^ ^ ^ ^
  • 30. Two qualitative variables (Y) Salary = 1 + ’1D1 + ”1 D2 + 2X + u or Y = 1+ ’1D1+ ”1D2 + 2X + ’2D1*X + ”2D2*X + u’ D1 = 1 if male = 0 otherwise sex D2 = 1 if white = 0 otherwise race (1) Mean salary for “non-white” female teacher: Y = 1 + 2X that is D1 = 0, D2 = 0 ^ ^ ^ (2) Mean salary for “non-white” male teacher: Y = (1 + ’1 D1) + (2+ ’2D1)X that is D1 = 1, D2 = 0 ^ ^ ^ ^ ^
  • 31. (3) Mean salary for “white” female teacher: Y = (1 + ’’1 D2) + 2 X + ”2D2X that is D1 = 0, D2 = 1 ^ ^ ^ ^ (4) Mean salary for “white” male teacher: Y = (1 + ’1 D1 +”1D2)+ (2+ ’2D1+ ”2D2)X that is D1 = 1, D2 = 1 ^ ^ ^ ^ ^ ^ ^
  • 32. D = 1 if 1970-1981 = 0 otherwise (1982-1995) Different types of dummy regression: Y = 1 + 2 X + ’1D + ’2D*X H0 : ’1 = 0 and ’2 = 0 Y = 1 + 2 X + ’1 D + ’2D*X H0 : ’1 = 0 Y = 1 + 2 X + ’1D + ’2D*X H0 : ’1  0 and ’2  0 Y = 1 + 2 X + ’1 D + ’2D*X H0 : ’2 = 0 1. 2 3 4
  • 33. (1970-1981): Yt = A1 + A2 Xt + u1t (1982-1995: Yt = B1 + B2 Xt + u2t Y X A1 = B1 1 A2 = B2 Identical regressions Y X A1 1 A2 Parallel regressions A1  B1, A2 = B2 B2 1 B1
  • 34. Y X A0 = B0 1 B1 Concurrent regressions A1 1 A0 = B0, A1  B1 Y X A0 1 A1 dissimilar regressions A0  B0, A1  B1 B0 1 B1
  • 35. Interactive effects between the two qualitative variables Spending(Y) = 1 + ’1 D1 + ”1 D2 + 2 income(X) + u D1 = 1 if female = 0 otherwise sex D2 = 1 if college graduate = 0 otherwise education Spending(Y) = 1 + ’1D1 + ”1D2 + ’”1D1*D2 + 2income(X) + u Interaction effect: ’1 = different effect of being a female ”1= different effect of being a college graduate ”’1 = different effect of being a female with college graduate
  • 36. Example : how can we test the hypothesis that the gasoline spending is different between a new car and a used car ? Let us assume that at the begin mile, there is no different between used car and new car. gas spending miles running Y X 0 ^ New car Y = 1 + 2 X ^ ^ ^ used car Y = 1+ 2X ^ Y = 1+ (2 +  ’2)X ^ ^ ^ ^ ^ ^
  • 37. The estimated relations are : used car : Yi = 1 + (2 +  ’2D) Xi where D = 1 ^ ^ ^ ^ new car : Yi = 1 + 2 Xi ^ ^ ^ == Yi = 1 + 2 Xi == ^ ^ ^ or If ’2 0, means the estimated slopes for cars is different. ^ Let 2= 2 + ’2 D where D = 1 if used car = 0 otherwise Now in one model : multiplicative dummy variable Yi = 1 + (2 + ’2 D) Xi + ui = 1 + 2 Xi + ’2 D*Xi +ui = 1 + 2 Xi + ’2 Zi + ui
  • 38. Test whether  ’2 = 0 or not ? ^ (ii) use t-test on  ’2:Y = 1 +2 Xi +  ’2 Z ^ ^ ^ ^ ^ H0 : ’2 = 0 ^ H1 : ’2 > 0 Used car is spending more gasoline per mile ^ compare tc (α, N-3) and t* If t* > tc (α, N-3) reject H0 or H1: ’2  0 If t* > tc (α/2, n-3)  reject Ho (i) Compare two separate models: (a) Y = 1 + 2 X (b) Y = ’1 +  2X ^ ^ ^ ^ ^ ^
  • 39. Check the t-value …... …... …... …... …... Y = 1 + 2 Xi + ’2 Zi obs Yi Xi Di (Di Xi) = Zi 1 210 100 0 0 2 250 110 1 110 3 340 150 1 150 4 305 120 1 120 ^ ^ ^ ^
  • 40. Shifts in both intercept and slope E = 1 + 2 T + u E : electricity consumption T : temperature To capture effect of seasonal factors E = 1 + ’1D1 +”1D2 + ’’’1 D3 + 2T + u where D1 = 1 if winter 0 otherwise D2 = 1 if spring 0 otherwise D3 = 1 if summer 0 otherwise spring summer fall winter Q1 Q2 Q3 Q4
  • 41. ’’’1 E=(1+ ”’1)+ 2T (Summer) ^ ^ ^ ^ ^ 1 ^ T E E = 1 + 2T (Fall) ^ ^ ^ E = (1 + ”1) + 2 T (Spring) ^ ^ ^ ^ ’’1 ^ E = (1 + ’1) + 2 T (winter) ^ ^ ^ ’1 ^ ^ Measure the basic difference of four seasonal results : Fall E = 1 + 2 T ^ ^ ^ Spring E = (1 + ”1)+ 2 T ^ ^ ^ ^ Winter E = (1 + ’1)+ 2 T ^ ^ ^ ^ Summer E = ( 1+”’1)+ 2 T ^ ^ ^ ^
  • 42. Also consider the slope in different seasons Let *2 = 2 + ’2D1 + ’’2 D2 + ’’’2 D3 Thus, the full general specification is E = [1+ ’1D1 + ”1D2+ ”’1D3] + 2T + ’2 D1 T + ”2D2 T + ”’2D3 T + u Z1 Z2 Z3
  • 43. Measure the four seasonal results : Fall E = 1 + 2 T ^ ^ ^ Spring E = (1 + ”1)+(2 + ”1) T ^ ^ ^ ^ ^ Winter E = (1 + ’1)+ (2 + ’2) T ^ ^ ^ ^ ^ Summer E = ( 1+”’1)+ (2 + ”’2) T ^ ^ ^ ^ ^ 1 ^ T E E = 1 + 2T (Fall) ^ ^ ^ E = (1 + ’1)+(2 +’2)T(winter) ^ ^ ^ ^ ^ ’1 ^ E = (1 + ”1)+(2 + ”2)T (Spring) ^ ^ ^ ^ ’’1 ^ ’’’1 E=(1+ ”’1)+(2+ ”’2)T(Summer) ^ ^ ^ ^ ^ ^
  • 44. Quarterly effect is same as seasonal effect D1 = 1 1st Quarter = 0 otherwise D2 = 1 2nd Quarter = 0 otherwise D3 = 1 3rd Quarter = 0 otherwise Control quarter is the 4th quarter
  • 45. 1. Set the seasonal dummy01= 1 if there is the 1st quarter = 0 otherwise
  • 47. Basic model Yt = 1 + 2 Xt + ut 1974 1960 1989 Define a dummy variable : D = 1 for the period 1974 onward = 0 otherwise To test whether the structures of two periods are different, the specification must assume that *1 = 1 + ’1 D *2 = 2 + ’2 D Dummy regression: Yt = 1 + ’1 D + 2 Xt + ’2D Xt + ut (2)
  • 48. The Chow test on the Unemployment rate-capacity utilization rate Dependent Var. Constant CAPt R2 F RSS n _ unemplt 30.0 -0.293 0.761 93.6 17.15 30 (12.1) (9.7) RSSR ^ unemplt 19.64 -0.175 0.59 19.7 4.69 14 (5.9) (4.4) RSS1 ^ unemplt 30.63 -0.296 0.871 102.1 3.29 16 (13.1) (10.1) RSS2 ^ Note : t-values are in parentheses
  • 49. H0 : No structural change H1 : yes For the unrestricted model : RSSu = RSS1 + RSS2 = 4.69 + 3.29 = 7.98 F* = (RSSR - RSSu) / k RSSu / (T - 2k) = (17.15 - 7.98) / 2 7.98 / (30 - 4) = 14.9 F* > Fc ==> reject H0 Fc 0.01, k, T -2k = Fc 0.01 = 5.53 0.05 0.05, 2, 26 = 3.37 Restriction F-test procedures:
  • 50. Sample : 1960 - 1989 Dt = 1 1974 to 1980 = 0 prior to 1974 unempl = 19.6 + 11.0 Dt - 0.175 CAPt - 0.121 (Dt*CAPt) ^ (6.7) (2.7) (5.0) (2.5) R2 = 0.88 SEE = 0.554 F = 72.2 n = 30 _ The estimated of 1974-1980: unempl = (19.6+11.0) - (0.175+0.121)CAP = 30.6 - 0.296 CAP ^ ^ The estimated of 1960-1973: unempl = 19.6 - 0.175 CAP Using the dummy variable to identify the structural change
  • 51. D = 1 if t  74 = 0 otherwise Observed data Year Ut CAPt Dt Dt*CAPt 60 4.20 5.70 0 0 61 0 0 62 0 0 63 0 0 … … ... 68 0 0 69 0 0 70 0 0 71 0 0 72 0 0 73 0 0 74 1 75 1 76 1 77 1 ... 1 ... 1 ... 1 89 1 … ………….…… … …...….…….... 10.5 11.2 10.5 11.2 Ut = 1 + 2 CAPt + ’1Dt + ’2 Dt*CAPt
  • 52. The estimated models are : 1974 : 1 and onward Y = 1 + 2 X ^ ^ ^ Now the basic model becomes Yt = 1 + ’1 D + 2 Xt + ’2 D Xt + ut Yt = 1 + ’1 D + 2 Xt + ’2 X* t + ut ==> === == Check t* > 2.0 1974 : 1 1950 1995 Prior to 1974 : 1 Y = ( 1 + ’1D)+(2 + ’2D) X ^ ^ ^ ^ ^ * * (4)
  • 53. GENR DUMMY = 1 (sample 1970 - 1980) GENR DUMMY = 0 (sample 1981 - 1991) ================================================= obs SAVINGS INCOME DUMMY D*INCOME ================================================= 1970 57.50000 831.0000 1.000000 831.0000 1971 65.40000 893.5000 1.000000 893.5000 1972 59.70000 980.5000 1.000000 980.5000 1973 86.10000 1098.700 1.000000 1098.700 1974 93.40000 1205.700 1.000000 1205.700 1975 100.3000 1307.300 1.000000 1307.300 1976 93.00000 1446.300 1.000000 1446.300 1977 87.90000 1601.300 1.000000 1601.300 1978 107.8000 1807.900 1.000000 1807.900 1979 123.3000 2033.100 1.000000 2033.100 1980 153.8000 2265.400 1.000000 2265.400 1981 191.8000 2534.700 0.000000 0.000000 1982 199.5000 2690.900 0.000000 0.000000 1983 168.7000 2862.500 0.000000 0.000000 1984 222.0000 3154.600 0.000000 0.000000 1985 189.3000 3379.800 0.000000 0.000000 1986 187.5000 3590.400 0.000000 0.000000 1987 142.0000 3802.000 0.000000 0.000000 1988 155.7000 4075.900 0.000000 0.000000 1989 175.6000 4664.200 0.000000 0.000000 1990 175.6000 4664.200 0.000000 0.000000 1991 199.6000 4828.300 0.000000 0.000000 =================================================
  • 54. Savings = 1 + 2 Income + ’1D + ’2D*Income + u D = 1 1970--1980 = 0 1981--1991 Estimated for 1970 - 1980 : D = 1 Savings = (1 + ’1) +(2 + ’2) Income ^ ^ ^ ^ 1 Estimated for 1981 - 1991 : D = 0 Savings = 1 + 2 Income ^ ^ 2 Dummy Regression Results: 1970 - 1991 : Savings = 217.81 - 203.19 D - 0.010 Income + 0.066 D*Income (7.96) (-6.19) (-1.39) (4.63)
  • 55. 70 - 80: Savings = (217.81 - 203.19) + (-0.010 + 0.066) Income = 14.62 + 0.056 Income 81 - 91: Savings = 217.81 - 0.010 Income 1970 - 1991 : Savings = 57.63 + 0.031 Income (3.86) (5.95) 1970 - 1980 : Savings = 14.61 + 0.056 Income (1.40) (7.93) 1981 - 1991 : Savings = 217.81 + 0.010 Income (6.16) (-1.08)
  • 56. Savings = -1.250 + 0.091 Dummy + 0.125 Income (-3.42) (0.506) (7.04) LS // Dependent Variable is SAVINGS Date: 03/02/99 Time: 22:23 Sample: 1946 1963 Number of observations: 18 ===================================================== Variable Coefficient Std. Error t-Statistic. Prob. ===================================================== C -1.250957 0.364879 -3.428419 0.0037 DUMMY 0.091857 0.181244 0.506816 0.6197 INCOME -0.125655 0.017837 -7.044517 0.0000 ===================================================== R-squared 0.919909 Mean dependent var 0.773333 Adjusted R-squared 0.909230 S.D. dependent var 0.642806 S.E. of likelihood 0.193665 Akaike info criterion -3.132238 Sum squared resid 0.562593 Schwarz criterion -2.983843 Log likelihood 5.649250 F-statistic 86.14326 Durbin-Watson stat 0.976197 Prob(F-statistic) 0.000000 ===================================================== Only consider the difference in intercept
  • 57. LS // Dependent Variable is SAVINGS Date: 03/02/99 Time: 22:23 Sample: 1946 1963 Number of observations: 18 ===================================================== Variable Coefficient Std. Error t-Statistic. Prob. ===================================================== C -1.750172 0.331888 -5.273377 0.0001 DUMMY 1.483923 0.470362 3.154852 0.0070 INCOME 0.150450 0.016286 9.238172 0.0000 DINCOME -0.103422 0.033260 -3.109471 0.0077 ===================================================== R-squared 0.952626 Mean dependent var 0.773333 Adjusted R-squared 0.942475 S.D. dependent var 0.642806 S.E. of likelihood 0.154173 Akaike info criterion -3.546228 Sum squared resid 0.332771 Schwarz criterion -3.348367 Log likelihood 10.37516 F-statistic 93.84109 Durbin-Watson stat 1.468099 Prob(F-statistic) 0.000000 ===================================================== Whether intercept and slope change?
  • 58. 1946 - 1954 : = -0.2662 + 0.047 Income D1 = 1 1955 - 1963 : = -1.750 + 0.150 Income D1 = 0 Savings = -1.750 + 1.483 D + 0.150 Income - 0.103 (Income*D) (-5.273) (3.154) (9.238) (-3.109) ^
  • 59. ln Y = 1 + 2 X + ’1 D (Salary) (years of teaching) D1 = 1 for male = 0 otherwise ln Y = 2.9298 + 0.0546 X2 + 0.1341 D ^ t=(481.5) (48.3) (27.2) R2 = 0.995 DW = 2.51 exp(0.1341)=1.1435 Exp(0)=1 This means the starting salary of male teacher is higher than the female teacher by 14.35 percent. The estimated male teacher salary : ln Y = (2.9298 + 0.1341) + 0.0546 X ln Y = 3.0639 + 0.0546 X ^ ^