Professional Documents
Culture Documents
Dummy-Variable Regression Model
Dummy-Variable Regression Model
Dummy-Variable Regression Model
Model
Dummy
Dummy Inter-
Inter-
Linear
Linear
Variable
Variable action
action
Poly-
Poly- Square
Square Log
Log Reciprocal
Reciprocal Exponential
Exponential
Nomial
Nomial Root
Root
0 if Male
X2
1 if Female
Females
b0 + b2
b0
Males
0 X1
0
© 1999 Prentice-Hall, Inc. Chap. 14 - 7
Interpreting Dummy-
Variable Model Equation
Given: Yi b0 b1X 1i b2 X 2i
Y Starting salary of college grad' s
X 1 GPA
0 if Male
X2
1 if Female
Males ( X 2 0):
Yi b0 b1X 1i b2 0 b0 b1X 1i
FEMALES
( X 1) :
Yˆi b0 b1 X1i b2 1 b0 b2 b1 X1i
2
Females
b0 + b2
b0
Males
0 X1
0
© 1999 Prentice-Hall, Inc. Chap. 14 - 10
Dummy-Variable Model
Example
Computer Output : Yˆi 3 5 X 1i 7 X 2i
X 2 10 if Male
if Female
Same slopes
Males ( X 0) :
Yˆi 3 5 X 1i 7 0 3 5 X 1i
2
Females ( X 1) :
Yˆi 3 5 X1i 71 3 7 5 X1i 10 5 X
2
1i
Dummy
Dummy Inter-
Inter-
Linear
Linear Variable
Variable action
action
Poly-
Poly- Square
Square Log
Log Reciprocal
Reciprocal Exponential
Exponential
Nomial
Nomial Root
Root
Given:
Yi 0 1X 1i 2 X 2i 3 X 1i X 2i i
8
Y = 1 + 2X1 + 3(0) + 4X1(0) = 1 + 2X1
4
0 X1
0 0.5 1 1.5
Effect (slope) of X1 on Y does depend on X2 value
© 1999 Prentice-Hall, Inc. Chap. 14 - 20
Interaction Regression
Model Worksheet
1 1 1 3 3
2 4 8 5 40
3 1 3 2 6
4 3 5 6 30
: : : : :
Multiply X1 by X2 to get X1X2.
Run regression with Y, X1, X2 , X1X2
© 1999 Prentice-Hall, Inc. Chap. 14 - 21
Interpretation when
there are 3+levels
Y 1MALE 2 MARRIED 3 DIVORCED
a MeanY for a single female
(MALE,MARRIED,DIVORCED=0)
b1 = Difference in means between males and females
(a+b1=mean Y for single males)
b2 = Difference in means between single and married
(holding gender constant)
b3= Difference in means between divorced and single
b2-b3=Difference in means between married and
divorced
© 1999 Prentice-Hall, Inc. Chap. 14 - 22
Interpretation when
there are 3+levels
It is possible to interact the dummy variables. This can
give an identical result as a 2-way ANOVA.
•In this example, this would allow the effect of marital
status to vary with gender.
FEMALE 0 B2 B3
Difference
FEMALE MALE
Single: Single: 1 1
Married: 2 Married: 1 2 4 1 4
Divorced: 3 Divorced: 1 3 5 1 5
EXAMPLE
Dummy
Dummy Inter-
Inter-
Linear
Linear action
Variable
Variable action
Poly-
Poly- Square
Square Log
Log Reciprocal
Reciprocal Exponential
Exponential
Nomial
Nomial Root
Root
Y Y Y Y
Yi 0 1 X1i 2 X12i 3 X 2i i
• Here we must test totest for the
significance of X1 - an F-test for these two
1 2 0
“variables”
ln Yi ln 0 1ln X 1i 2 ln X 2i ln i
© 1999 Prentice-Hall, Inc. Chap. 14 - 35
Using Transformations
1 < 0
X1
Transforms one of above model to one that appears linear.
Often used to overcome heteroscedasticity.
© 1999 Prentice-Hall, Inc. Chap. 14 - 37
Logarithmic
Transformation
Y i 0 1 ln( X 1 i ) 2 ln( X 2 i ) i
Y 1 > 0
Similarly for X2
1 < 0
X1
Similarly for X2
1 < 0
X1
Transformed into: ln Y i 0 1 X 1 i 2 X 2 i ln 1
Log(Y)
xi
Then the b’s are called standardized
coefficients. They indicate the
number of standard deviations Y will
change when X changes by one
standard deviation
© 1999 Prentice-Hall, Inc. Chap. 14 - 51
BETA Coefficients Example
Changes)