Title: Chapter 9: Dummy Variables
1Chapter 9 Dummy Variables
- A Dummy Variable is a variable that can take on
only 2 possible values - yes, no
- up, down
- male, female
- union member, non-union member
- They provide a method for quantifying a
qualitative variable - ? The variable D 1 if yes, D 0 if no
- It doesnt matter which category gets the 0 or 1.
2Estimation with Dummy Variables
- If the dummy variable is the only independent
variable - Yt ?1 ?2Dt et
- If D 0 ? Yt ?1 et
- If D 1 ? Yt (?1 ?2) et
- Example Wage data (See class handout)
- FE 0 if the person is male
- FE 1 if the person is female
- Waget ?1 ?2FEt et
- Least squares regression will produce a b1 and b2
value such that - b1 the mean of the Wage values for the FE0
values - b1 b2 the mean of the Wage values for the
FE1 values
3Estimation with Dummy Variables
If there is one continuous explanatory variable
and one dummy variable Yt ?1 ?2Xt ?Dt
et If D 0 ? Yt ?1 ?2Xt et If D 1 ?
Yt (?1 ?) ?2Xt et
Suppose that ?1 gt0, ?2 gt0, ? gt 0 ? It is as
though we have two regression lines that have the
same slope coefficient but have difference
intercepts.
Y
?
?2
?1 ?
?2
?1
X
4Estimation with Dummy Variables
Example Wage data (See class handout) FE 0
if the person is male FE 1 if the person is
female Waget ?1 ?2EDt ?3FEt et We
estimate this model as an ordinary multiple
regression model. Our estimate b3 will measure
the difference in wages for males vs. females,
after controlling for differences in
education. See class handout.
5Interaction Terms
- An interaction term is an independent variable
that is the product of two other independent
variables. These independent variables can be
continuous or dummy variables - Yt ?1 ?2Xt ?3Zt ?4XtZt et
- In this model, the effect of X on Y will depend
on the level of Z. - In this model, the effect of Z on Y will depend
on the level of X.
6Interaction Terms Involving Dummy Variables
- Yt ?1 ?2Xt ?3Dt ?4DtXt et
- If D 0 ? Yt ?1 ?2Xt et
- If D 1 ? Yt (?1 ?3 ) (?2 ?4 )Xt et
Suppose that ?1 gt0, ?2 gt0, ?3 gt0, ?4 gt0 ? It is
as though we have two regression lines that have
different slope coefficients and different
intercepts.
Y
?2?4
?1 ?3
?2
?1
X
7(No Transcript)