of 32
8/17/2019 Independent Dummy Variables
1/32
11
Regression when some of theRegression when some of the
regressors are qualitativeregressors are qualitative
Salary =f( education, experience,Salary =f( education, experience, sex, racesex, race ))
+E+E ain!charges of "ehicle=f( #ge,ain!charges of "ehicle=f( #ge, qualityquality) +E) +E
8/17/2019 Independent Dummy Variables
2/32
22
$uantitative varia%les in$uantitative varia%les in
regressionregression
(&ummy "aria%les)(&ummy "aria%les) 'n regression analysis response varia%le is not only inuenced %y'n regression analysis response varia%le is not only inuenced %y
the quantitative varia%les %ut also %y many varia%les of interestthe quantitative varia%les %ut also %y many varia%les of interestthat are not quantitative %ut are qualitative such as gender, race,that are not quantitative %ut are qualitative such as gender, race,colourcolour
or example* holding all other factors constant, female collegeor example* holding all other factors constant, female college
professors are found to earn less than their male counterpartsprofessors are found to earn less than their male counterparts on whites are found to earn less than whiteson whites are found to earn less than whites his pattern may result from sex or racial discrimination his pattern may result from sex or racial discrimination $ualitative varia%les such as sex and race does inuence the$ualitative varia%les such as sex and race does inuence the
dependent varia%le and clearly should %e included among thedependent varia%le and clearly should %e included among the
explanatory varia%les!explanatory varia%les! $ualitative varia%les usually indicate the presence or a%sence of$ualitative varia%les usually indicate the presence or a%sence of
a quality such as male or female %lac- or white, literate ora quality such as male or female %lac- or white, literate orilliterate, ur%an or rural, etc the pro%lem is how to incorporateilliterate, ur%an or rural, etc the pro%lem is how to incorporatesuch varia%les in regression along with other quantitativesuch varia%les in regression along with other quantitativevaria%lesvaria%les
8/17/2019 Independent Dummy Variables
3/32
33
$ualitative varia%les in regression$ualitative varia%les in regression
(&ummy "aria%les)(&ummy "aria%les)
.ne method of quantifying such attri%utes is %y constructing.ne method of quantifying such attri%utes is %y constructingarti/cial varia%les which ta-e on values of 0 or 1, 1 indicatingarti/cial varia%les which ta-e on values of 0 or 1, 1 indicatingthe a%sence of an attri%ute and 0 indicating the presence ofthe a%sence of an attri%ute and 0 indicating the presence ofthat attri%utethat attri%ute
"aria%les which assume such 1 and 0 values are called dummy"aria%les which assume such 1 and 0 values are called dummyvaria%les other names for such varia%les are indicatorvaria%les other names for such varia%les are indicatorvaria%les, %inary varia%les qualitative varia%les andvaria%les, %inary varia%les qualitative varia%les andcategorical varia%les!categorical varia%les!
2e can include dummy varia%les in a regression and conduct2e can include dummy varia%les in a regression and conduct
hypothesis tests, 3ust as we can any other quantitativehypothesis tests, 3ust as we can any other quantitativevaria%les! 4ut,varia%les! 4ut, interpretation of the coecient on the dummyinterpretation of the coecient on the dummyvariablevariable is somewhat di5erent than what we6ve seen %eforeis somewhat di5erent than what we6ve seen %efore
8/17/2019 Independent Dummy Variables
4/32
44
7onsider a data on annual salary of male7onsider a data on annual salary of male
and female college teachers and yearsand female college teachers and years
of teaching experience!of teaching experience!
&e/ne two dummy varia%les &8 9&e/ne two dummy varia%les &8 9
&:,one for each category and the model&:,one for each category and the model
isis
; ;ii= annual salary of the ith= annual salary of the ith
college professorcollege professor
8/17/2019 Independent Dummy Variables
5/32
55
&e/ne one dummy varia%les &8&e/ne one dummy varia%les &8
for male category and the modelfor male category and the model
isis
;i= annual salary of the ith ;i= annual salary of the ith
college professor college professor
8/17/2019 Independent Dummy Variables
6/32
66
'mportant notes'mportant notes
The assin'ent of " and 1 -alue are ar.itrary
/ateory that is assined the -alue of " is often referred to as
control roup0 .ase cateory0 or o'itted cateory in the sense
that co'parisons are 'ade ith that cateory n this exa'ple
fe'ale roup
ntercept ter' α1 in the 'odel is introduced for the control
roup
8/17/2019 Independent Dummy Variables
7/32
77
'nterpretation of results'nterpretation of results
ean salary for emale professorean salary for emale professor
ean salary for male professorean salary for male professor
( ) iiii X D X Y β α +==Ε
12 "0( ) ( )
iiii X D X Y β α α ++==Ε 212 10
he estimated equation %y using .S is ;= 8>!> + ?!?> &8+
>!@0 < (0?!8A)(?!B) (8!C>)
0) he estimated mean salary of female college teacher is=8>!>+ >!@0<
8) he estimated mean salary of male college teacher is=:0!1>+ >!@0<
:) he estimated mean salary of female college teacher with ?years of experience is = 8>!>+>!@0(?) =@0!>?
8/17/2019 Independent Dummy Variables
8/32
88
est of hypothesis est of hypothesis
2α
21 α+α
7ompare the annual mean salary of
male and female college teachers4o5 α26"
( )
( )ns
2
22 7!"7!
"!$!
8-ar
8t =
−=
α
α−α=
ie sex has no effect on 'ean
salary of collee teachers
1α
emale
ale
8/17/2019 Independent Dummy Variables
9/32
8/17/2019 Independent Dummy Variables
10/32
1010
'ntroduce dummy varia%le for'ntroduce dummy varia%le for
GE&ERGE&ER
2here2here
;i= 4ase salary of the ith salesperson ;i= 4ase salary of the ith salesperson
8/17/2019 Independent Dummy Variables
11/32
1111
Regressions for dummyRegressions for dummy
varia%lesvaria%les
Regression for saleswomen&8=1
Regression forsalesmen&8=0
8/17/2019 Independent Dummy Variables
12/32
1212
2α
21 α+α
1α
Saleswomen
Salesmen
2α
21 α+α 1α
Saleswomen
Salesmen
1α 1
α
Saleswomen
Salesmen
8/17/2019 Independent Dummy Variables
13/32
1313
SCATTER PLOT
Salary vs experiene
E!PER"E#
403020100
S A L A R $
14
13
12
11
10
9
8
7
6
%E#&ER
'e(ale
(ale
# l i f h d l# l i f th d l
8/17/2019 Independent Dummy Variables
14/32
1414
#nalysis of the model#nalysis of the model
#s the regression coeFcient for gender is signi/cant(pvalue H !1@), so we conclude that the /rm doesdiscriminate against its saleswomen! #s coeFcient fordummy varia%le is positive so salesmen6s salary(present category) is more than salesmen6s salary
4o5 α26" ie 9ender has no influence on salary
8/17/2019 Independent Dummy Variables
15/32
1515
Estimation in regressionEstimation in regression
Estimated mean salary of Salesman with @ months ofexperience
Estimated mean salary of Saleswoman with @ months of experience
:!#7#
or #7#!)#(22")"(;7"$!"#8
=
=++=iY
8/17/2019 Independent Dummy Variables
16/32
1616
Regression 2ith wo $ualitative "aria%lesRegression 2ith wo $ualitative "aria%les7onsider the regression of the advertising expenditure7onsider the regression of the advertising expenditure
on the sales, type of /rm (on the sales, type of /rm (incorporated, notincorporated, not
incorporatedincorporated) pu%lic relation department and quality of) pu%lic relation department and quality ofsales management (sales management (high, lowhigh, low))
UDαDααY 33221 +++=
&2)1 in*rp*ra+e,
)0 O+-er.ise
&3)1 i' /ali+y *' sales (anae(en+ -i-
)0 O+-er.ise
#*+ in*rp*ra+e, 'ir( .i+- l*. /ali+y
*' sales (anae(en+ is COPAR"SO#COPAR"SO#
a+e*ry
8/17/2019 Independent Dummy Variables
17/32
1717
&ata analysis in ''#4&ata analysis in ''#4
http://c/Documents%20and%20Settings/ARIF/Desktop/example1.MTWhttp://c/Documents%20and%20Settings/ARIF/Desktop/example1.MTWhttp://c/Documents%20and%20Settings/ARIF/Desktop/example1.MTW
8/17/2019 Independent Dummy Variables
18/32
1818
Es+i(a+e, Reressi*n e/a+i*n is
$)4400016000&25500&3 "#TERPRETAT"O# Averae expen,i+re '*r ase a+e*ry
n*+ in*p*ra+e, .i+- l*. (anae(en+
is 44000
T-e expen,i+re is ,erease y 16000 i' +-e 'ir( is in*rp*ra+e,Expen,i+re is inrease y 5500
i' /ali+y *' sale (anae(en+ is -i-:
#*nsini'ian+ vale +ra+i* '*r &2 in,ia+es +-a+ +-ere is n* ,i''erene e+.een +-e
A,ver+isin expen,i+re *' in*rp*ra+e, an, n*+ in*rp*ra+e, 'ir(s
#*nsini'ian+ vale +ra+i* '*r &3 in,ia+es +-a+ +-ere is n* ,i''erene e+.een +-e
A,ver+isin expen,i+re '*r +-e 'ir(s -avin -i- *r l*. /ali+y sales (anae(en+
&8=0 incorporated&8=0 incorporated
=1 .therwise(i!e not incorporated) =1 .therwise(i!e not incorporated)
(&:=0 if quality of sales management high(&:=0 if quality of sales management high
=1 .therwise( ow sales management) =1 .therwise( ow sales management)
8/17/2019 Independent Dummy Variables
19/32
1919
Regression 2ith more than two categoriesSuppose that %ased on the cross sectional data we want toregress the annual expenditure on healthcare %y anindividual on the income and education of the individual!
Since the varia%le education is qualitative in nature weconsider three mutually exclusive levels of education (i)ess than high school (ii) Iigh School (iii) 7ollege
UDαDααY 33221 +++=
;i= #nnual expenditure on health care
8/17/2019 Independent Dummy Variables
20/32
8/17/2019 Independent Dummy Variables
21/32
2121
'nterpretation of results'nterpretation of results
ean healthcare expenditure %y an individual having less than high school e
X D DY E β α +=== 132 )"0"
8/17/2019 Independent Dummy Variables
22/32
2222
TET !" H#P!THE$TET !" H#P!THE$0) 7omparison of mean expenditure on health care %y an0) 7omparison of mean expenditure on health care %y an
individual having high school education and less than highindividual having high school education and less than high
school education ( 4ase group)school education ( 4ase group)
8) 7omparison of mean expenditure on health care %y an8) 7omparison of mean expenditure on health care %y anindividual having college education and less than high schoolindividual having college education and less than high school
education ( 4ase group)education ( 4ase group)
"α542"
=
"α54 3" =
Expendie= -4.41 + 7.92D2 +10.5 D3 +0.361X
SE (3.195) (3.328) (7.813) (0.122)
t-ratio 2.38* 1.34 (2.95)
P-Value 0.037 0.206 0.013
TET !" H#P!THE$TET !" H#P!THE$
8/17/2019 Independent Dummy Variables
23/32
2323
TET !" H#P!THE$TET !" H#P!THE$ :) 7omparison of mean expenditure on health care %y an individual having high school:) 7omparison of mean expenditure on health care %y an individual having high school
education and collegeeducation and college
32" αα54 =
Unrestricted Model *estricted %odel
i3i32i21 UDαDααY ++++= X β 32" αα54 = 32
UDααY
=
2
i2i=
21
D D DWhere
X
+=
+++= β
Unrestricted ANOVA Restricted ANOVA
SOV DF SS
Regression
Error
Total
3
11
14
3!"#$
%1#1
31"4#
SOV DF SS
Regression
Error
Total
"
1"
14
3!1#"
%"#&
31"4#
( ) ( ) ( ) ( ) ns
URUR
UR RUR R
Edf ESS
Edf Edf ESS ESS F 2!1#"
#!
"1
11
8/17/2019 Independent Dummy Variables
24/32
2424
&K; "#R'#4E .R 7.L#R'G&K; "#R'#4E .R 7.L#R'G
2. REGRESS'. 'ES 2. REGRESS'. 'ES
2hen we use a regression model involving time series data, it2hen we use a regression model involving time series data, it
may happen that there is amay happen that there is a structural changestructural change in thein the
relationship %etween the regressand and the regressorsrelationship %etween the regressand and the regressors
4y structural change we mean that the value of the parameters4y structural change we mean that the value of the parametersof the model do not remain the same through the entire timeof the model do not remain the same through the entire time
periodperiod!! &ummy varia%le can %e used to /nd structural&ummy varia%le can %e used to /nd structural
changes in the regression parameters!changes in the regression parameters!
7oncurrent Larallel &issimilar Equal or
7oincident
E%uality of two regressionE
%uality of two regression
8/17/2019 Independent Dummy Variables
25/32
2525
E%uality of two regressionE%uality of two regression
lines by dummy variablelines by dummy variable
approach:approach:E
8/17/2019 Independent Dummy Variables
26/32
2626
( ) ( )β βα α UD X D X2i i 2i i1 2 i1 2ii y = + + + + − − − −
;i = saving of a family
8/17/2019 Independent Dummy Variables
27/32
2727
he equality of two saving function can %e he equality of two saving function can %e
tested %y considering the hypothesistested %y considering the hypothesis
8/17/2019 Independent Dummy Variables
28/32
2828
S."S." && SSSS
RegRegErrorError
::0?0?
0?C>?C:>0?C>?C:>?:8@:8???:8@:8??
otal otal 0B0B A1111111A1111111
S."S." && SSSS
RegReg
ErrorError
00
0A0A
0@A1?@?00@A1?@?0
?>0B:>:B?>0B:>:B
otal otal 0B0B A1111111A1111111
Unrestricted %odel
( )β βα α UD X D X2i i 2i i1 2 i1 2i
y = + + + +*estricted%odel
iβα Xi1 1i U y = + +
( ) ( ) ( ) ( )< !$173$37 !32#32!! < 1; 1!< !32#32!! < 1!
$("";!#"11
37#332712#
R UR R UR
UR UR
ns
ESS ESS Edf Edf F ESS Edf
− − − −= =
= =
Regression ines for Kr%an 9 Rural are
E
8/17/2019 Independent Dummy Variables
29/32
2929
E
8/17/2019 Independent Dummy Variables
30/32
3030
'ntroduce dummy varia%le for'ntroduce dummy varia%le for
structural changestructural change
;i= saving
8/17/2019 Independent Dummy Variables
31/32
3131
Scatter plotScatter plot
8/17/2019 Independent Dummy Variables
32/32
3232
S."S." && SSSS
RegReg
ErrorError
::
8888
AA1CB!A:>AA1CB!A:>
00CB1!8@:00CB1!8@:
otal otal 8@8@ BBAC1!1ACBBAC1!1AC
S."S." && SSSS
RegRegErrorError
008>8>
C??80!CAAC??80!CAA8:8>A!8BA8:8>A!8BA
otal otal 8@8@ BBAC1!1ACBBAC1!1AC
*estricted%odel
iβα Xi1 1
iU y = + +
Regression are di5erent for two time
( ) ( )( )
=!71"72#3#
"23#27
22
2#3117"
)222$(
2#3117"27;232$;
<
<==
−
−
=−−
=
URUR
UR RUR R
Edf ESS
Edf Edf ESS ESS F
)("!#"";"$71#2"1!18iii
DX X DY −++=i X Y "3;"$23!2
8 +=
iiiii U X D X DY +−++= )(
'odel*estricted>Un
1121 β β α α