You are on page 1of 11

Dummy Variables

Econometrics Multiple Regression Analysis with Qualitative Information: Binary (or Dummy) Variables
Joo Valle e Azevedo a
Faculdade de Economia Universidade Nova de Lisboa

Spring Semester

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, March 2011

1 / 11

Dummy Variables Dummy Variables

Dummy Variables
A dummy (or binary) variable takes on the value 0 or 1 and are often used as regressors Dummy variables are also called binary variables, for obvious reasons Examples:
wage = 0 + 1 Education + 2 Experience + 3 Male + u
Malei (= 1 if individual i is male, 0 if female) If 3 > 0, there is evidence of discrimination against women

wage = 0 + 1 Education + 2 Experience + 3 Sporting + u


Sportingi (= 1 if individual i supports Sporting)

Can use all the inference tools learned so far, as long as the necessary assumptions hold!
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, March 2011 2 / 11

Dummy Variables Dummy Variables

Dummy Variables
Consider a simple model with one continuous variable (x) and one dummy (d) y = 0 + 0 d + 1 x + u

This can be interpreted as an intercept shift


If d=0, then y = 0 + 1 x + u If d=1, then y = (0 + 0 ) + 1 x + u We call the group of individuals with d=0 is the base group

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, March 2011

3 / 11

Dummy Variables Dummy Variables

Example with 0 > 0 where Gauss-Markov assumptions hold


E[y|x,d] E[y|x,d=1] = (b0 + d0) + b1x
d=1 slope = b1
d0 b0

d=0
E[y|x,d=0] = b0 + b1x

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, March 2011

4 / 11

Dummy Variables Dummy Variables

Dummy Variables: Alternative Formulations


Consider a model with one dummy variable (d) y = 0 + 0 Male + 1 x + u, where Male is either 0 or 1
The intercept for females is 0 The intercept for males is 0 + 0

Could write instead: y = 0 Female + 0 Male + 1 x + u


The intercept for females is 0 The intercept for males is 0

But never ever write a model like: y = 0 + 1 Female + 0 Male + 1 x + u, Why?


Violates Assumption MLR.3 (No perfect Collinearity)
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, March 2011 5 / 11

Dummy Variables Dummy Variables

Dummies for Multiple Categories


Can use dummy variables to control for multiple categories wage = 0 +1 Education +2 Experience +3 Sporting +4 Benca+u

Sportingi (=1 if individual i supports Sporting, 0 otherwise) Bencai (=1 if individual i supports Benca, 0 otherwise) As long as our sample contains supporters of both teams and supporters of other teams (or not supporting any team)

Could include additionally a dummy Porto, as long as our sample contains supporters of the three teams and supporters of other teams (or not supporting any team). Why?
Otherwise we would violate Assumption MLR.3 (No perfect Collinearity)
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, March 2011 6 / 11

Dummy Variables Dummy Variables

Multiple Categories
If we have n categories we should have n-1 dummy variables since the base group is represented by the intercept 0
Example: In our wage regression, we want to include dummies for physical attractiveness. Categories are: Below average, Average and Above average. We have 3 categories, so use 2 dummies

wage = 0 + 1 BelowAverage + 2 AboveAverage + otherfactors + u So, we chose Average individuals as the base group

Can transform continuous variable into categories (e.g., transform years of schooling into dummies Elementary School, Middle School, High-School, College, Post-Graduate Studies etc.). Be sure to leave one group as reference group (e.g., No Schooling )
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, March 2011 7 / 11

Dummy Variables Dummy Variables

Interactions among Dummies


Suppose we want to interact the dummies for physical attractiveness with the dummy for gender: have a total of 6 categories (must have 5 parameters besides the intercept)

wage

0 + 1 BelowAverage + 2 AboveAverage + 3 BelowAverage Male + +4 AboveAverage Male + 5 Male + otherfactors + u

Interacting dummy variables is like subdividing the group Here the base group is Female with Average looks (measured by 0 )

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, March 2011

8 / 11

Dummy Variables Dummy Variables

More on Interactions among Dummies


wage = 0 + 1 BelowAverage + 2 AboveAverage + 3 BelowAverage Male + 4 AboveAverage Male + 5 Male + otherfactors + u

If Male=0 and BelowAverage=0 and AboveAverage=1 we are talking about a Female in the category AboveAverage. The measured eect on this group is 0 + 2 If Male=1 and BelowAverage=0 and AboveAverage=0 we are talking about a Male in the category Average. The measured eect on this group is 0 + 5 (...)
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, March 2011 9 / 11

Dummy Variables Dummy Variables

Other Interactions among Dummies


Can also consider interacting a dummy variable, Male, with a continuous variable, Education measured in years y = 0 + 1 Male + 1 Education + 2 Male Education + u

If Male=0, then y = 0 + 1 Education + u If Male=1, then y = (0 + 1 ) + (1 + 2 )Education + u

Allows us to investigate whether the eect of Education is dierent across the two groups

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, March 2011

10 / 11

Dummy Variables Dummy Variables

Example of 0 > 0 and 1 < 0


y y = b0 + b1Education Male = 0 Male = 1 y = (b0 + d0) + (b1 + d1) Education Education

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, March 2011

11 / 11

You might also like