Date post: | 21-Jan-2015 |
Category: |
Lifestyle |
Upload: | lawrence-marsh |
View: | 94,251 times |
Download: | 8 times |
1
Dummy
Variable
Models
2
“Using Dummy Variables in
Wage Discrimination Cases”
Multiple Regression
Sandy: pages 603 - 613
Also read paper titled:
3Are Male Nurses Discriminated Against?
male nurses
0
female nurses
Years of experience, Xi
Wf
_4
^
Wm_
3^
~m
W 3
~
Wf
~
4
~
~
adjusted for
experience
not adjusted
for experience
o
ooo o
oo
o
o
oo
o
++ +
+++
+
+
+
+
+
+
+
+
+
++
+
+++++
++
o
oo
~
4
I. Dummy Variables -
Adjusting the intercept.
Adjusting the slope.
Adjusting both intercept and slope.
5Intercept Dummy Variables
Dummy variables are binary (0,1)
Dt = 1 if red car, Dt = 0 otherwise.
yt = 1 + 2Xt + 3Dt + et
yt = speed of car in miles per hour
Xt = age of car in years
Police: red cars travel faster.H0: 3 = 0H1: 3 > 0
6yt = 1 + 2Xt + 3Dt + et
red cars: yt = (1 + 3) + 2Xt + et other cars: yt = 1 + 2Xt + et
yt
Xt
milesper hour
age in years0
1 + 3
12
2
red cars
other cars
7Slope Dummy Variables
yt = 1 + 2Xt + 3DtXt + et
yt = 1 + (2 + 3)Xt + et
yt = 1 + 2Xt + et
yt
Xt
valueofporfolio
years0
2 + 3
12
stocks
bonds
Stock portfolio: Dt = 1 Bond portfolio: Dt = 0
1 = initial
investment
8Different Intercepts & Slopes
yt = 1 + 2Xt + 3Dt + 4DtXt + et
yt = (1 + 3) + (2 + 4)Xt + et
yt = 1 + 2Xt + et
yt
Xt
harvestweightof corn
rainfall
2 + 4
12
“miracle”
regular
“miracle” seed: Dt = 1 regular seed: Dt = 0
1 + 3
9yt = 1 + 2 Xt + 3 Dt + et
21+ 3
2
1
yt
Xt
Men
Women
0
yt = 1 + 2 Xt + et
For men Dt = 1. For women Dt = 0.
years of experience
yt = (1+ 3) + 2 Xt + et
wagerate
H0: 3 = 0
H1: 3 > 0 .
. Testing fordiscriminationin starting wage
10yt = 1 + 5 Xt + 6 Dt Xt + et
5
5 +6
1
yt
Xt
Men
Women
0
yt = 1 + (5 +6 )Xt + et
yt = 1 + 5 Xt + et
For men Dt = 1.
For women Dt = 0.
Men and women have the same starting wage, 1 , but their wage ratesincrease at different rates (diff.= 6 ).
6 > means that men’s wage rates areincreasing faster than women's wage rates.
years of experience
wagerate
11yt = 1 + 2 Xt + 3 Dt + 4 Dt Xt + et
1 + 3
1
2
2 + 4
yt
Xt
Men
Women
0
yt = (1 + 3) + (2 + 4) Xt + et
yt = 1 + 2 Xt + et
Women are given a higher starting wage, 1 , while men get the lower starting wage, 1 + 3 ,(3 < 0 ). But, men get a faster rate of increasein their wages, 2 + 4 , which is higher than therate of increase for women, 2 , (since 4 > 0 ).
years of experience
An Ineffective Affirmative Action Plan
women are startedat a higher wage.
Note:(3 < 0 )
wagerate
12Testing Qualitative Effects
1. Test for differences in intercept.
2. Test for differences in slope.
3. Test for differences in both
intercept and slope.
13
H0: vs1:
H0: vs1:
Yt 12Xt3Dt
4Dt Xt
b3
Est. Var b3 ˜ t n 4
b4
Est. Var b4 ˜ t n 4
men: Dt = 1 ; women: Dt = 0
Testing fordiscrimination instarting wage.
Testing fordiscrimination inwage increases.
intercept
slope
et
14Why NOW wants one-sided test andChauvinist Industries wants two-
sided.
15Are Two Regressions Equal?
yt = 1 + 2 Xt + 3 Dt + 4 Dt Xt + et
variations of “The Chow Test”
I. Assuming equal variances (pooling):
men: Dt = 1 ; women: Dt = 0
Ho: 3 = 4 = 0 vs. H1: otherwise
yt = wage rate
This model assumes equal wage rate variance.
Xt = years of experience
16Testing Ho: H1 : otherwise
and
SSE R yt b 1 b 2 X t 2
t 1
T
SSE U yt b1bXt bDt b Dt Xt2
t1
T
SSER SSEU 2
SSEU T 4 F T 4
intercept and slope
17
yt = 1 + 2 Xt + et
II. Allowing for unequal variances:
ytm = 1 + 2 Xtm + etm
ytw = 1 + 2 Xtw + etw
Everyone:
Men only:Women only:
SSER
Forcing men and women to have same 1, 2.
Allowing men and women to be different.SSEm
SSEw
where SSEU = SSEm + SSEw
F =(SSER SSEU)/J
SSEU /(TK)
J = # restrictions
K=unrestricted coefs.
(running three regressions)
J = 2 K = 4
18 Polynomial Terms
yt = 1 + 2 X t + 3 X2
t + 4 X3
t + et
Linear in parameters but nonlinear in variables:
yt = income; Xt = agePolynomial Regression
yt
X tPeople retire at different ages or not at all.
9020 30 40 50 60 8070
19
yt = 1 + 2 X t + 3 X2
t + 4 X3
t + et
yt = income; Xt = age
Polynomial Regression
Rate income is changing as we age:yt
Xt
= 2 + 2 3 X t + 3 4 X
2t
Slope changes as X t changes.
20 Continuous Interaction
yt = 1 + 2 Zt + 3 Bt + 4 Zt Bt + et
Exam grade = f(sleep:Zt , study time:Bt)
Sleep and study time do not act independently.
More study time will be more effective when combined with more sleep and less effective when combined with less sleep.
21
Your mind sortsthings out whileyou sleep (when you have things to sort out.)
yt = 1 + 2 Zt + 3 Bt + 4 Zt Bt + et
Exam grade = f(sleep:Zt , study time:Bt)
yt
Bt
= 2 + 4 Zt
Your studying is more effectivewith more sleep.
yt
Zt
= 2 + 4 Bt
continuous interaction
22
yt = 1 + 2 Zt + 3 Bt + 4 Zt Bt + et
Exam grade = f(sleep:Zt , study time:Bt)
If Zt + Bt = 24 hours, then Bt = (24 Zt)
yt = 1+ 2 Zt +3(24 Zt) +4 Zt (24 Zt) + et
yt = (1+24 3) + (23+24 4)Zt 4Z2
t + et
yt = 1 + 2 Zt + 3 Z2
t + et
Sleep needed to maximize your exam grade:yt
Zt
= 2 + 23 Zt = 0where 2 > 0 and 3 < 0
2
3
Zt =
23
Multicollinearity
Correlation among the“independent” variables.
Note: They are independent of the error term, and not of one another.
24 Let yi represent the ith person's wagerate and Xi represent their monthsof work experience in the equation:
yi = b1 + b2 Xi + ei (1)
b1 = intercept (starting wage)
b2 = increase in the person's wage for each additional month of work experience.
ei = error term with mean zero and estimated variance s2.
25
yi = b1 + b2 Xi + b3 Mi + b4 Fi + ei (2)
Fi = 1 if female Fi = 0 if male.
Mi = 1 if male Mi = 0 if female.
26
yi = b1 + b2 Xi + b3 Mi + b4 Fi + ei (2)
Unfortunately this equation contains
an underidentified set of parameters
(b1, b3, and b4) and cannot be estimated
without some restriction
on the coefficients.
27
To see this point, separate out the men's equation implied by equation (2) from the women's equation.
For the men's equation Mi =1 and Fi =0.
For men, equation (2) becomes:
yi = (b1 + b3) + b2 Xi + ei (3)
yi = b1 + b2 Xi + b3 Mi + b4 Fi + ei (2)
28
For women, Mi =0 and Fi =1.
For women, equation (2) becomes:
yi = (b1 + b4) + b2 Xi + ei (4)
29 Unfortunately, although we get estimates
of the intercepts (b1 + b3) and (b1 + b4),
the value of b1 cannot be separated
from the values of b3 and b4.
Some restriction is needed
to achieve identification
of b1, b3 and b4.
30
One such restriction is b1 = 0.
We can drop the original intercept term,
b1, since men and women already
have their own intercept terms,
b3 and b4, respectively.
31 Underidentification of equation (2) can also be expressed in matrix terms.
First, rewrite equation (2) putting the explanatory variables in a row vector multiplied by the corresponding column
vector of their respective coefficients:
y i1X iM iF i 2
3
4
i5
1
32 This only represents the ith observation where i = 1, ..., n.
To represent the entire set of n observations at once, we need to "pull the window shade down" as follows:
y1
y2
M
yn
1 X1 M1 F1
1 X2 M2 F2
M M M M
1 Xn Mn Fn
1
2
3
4
1
2
M
n
(6)
33
Equation (6) presents us with an X matrix whose first column (the column of ones) is an exact linear combination of the last two columns (the M and F columns).
Since Mi is always zero when Fi is equal to one and Mi is always one when Fi is equal to zero, then it always holds that Mi + Fi = 1.
Therefore, the first column is equal to the sum of the last two columns.
34Since Mi is always zero when Fi is equal to one and Mi is always one when Fi is equal to zero, then it always holds that Mi + Fi = 1.
1
1
M
1
M1
M2
M
Mn
F1
F2
M
Fn
(9)
35 Equation (6) and, therefore,equation (2), represent a case of perfect multicollinearity. This means that a restriction must be introduced that drops one of these columns out of the regression.
One such restriction is b1 = 0, which means dropping the originalintercept out of the regression model to provide the following reduced model:
yi = b2 Xi + b3 Mi + b4 Fi + ei (10)
Now men and women have separate interceptsand no common intercept is necessary.
36yi = b2 Xi + b3 Mi + b4 Fi + ei
b2b3
b2
b4
yi
Xi
Male
Female
0
yi = b3 + b2 Xi + ei
yi = b4 + b2 Xi + ei
For males Mi = 1 and Fi = 0.For females Mi = 0 and Fi = 1.
Males and females have differentstarting salaries , b3 > b4 , but theirsalaries increase at the same rate, b2.
37yi = b2 Xi + b3 Mi + b4 Fi + ei
b2b3
b2
b4
yi
Xi
Male
Female
0
yi = b3 + b2 Xi + ei
yi = b4 + b2 Xi + ei
For males Mi = 1 and Fi = 0.For females Mi = 0 and Fi = 1.
Males and females have differentstarting salaries , b3 > b4 , but theirsalaries increase at the same rate, b2.
years of experience
38yi = b1 + b5 Mi Xi + b6 Fi Xi + ei
b6
b5
b1
yi
Xi
Male
Female
0
yi = b1 + b5 Xi + ei
yi = b1 + b6 Xi + ei
For males Mi = 1 and Fi = 0.For females Mi = 0 and Fi = 1.
Males and Females have the same starting salary b1, but their salariesincrease at different rates ( b5 vs. b6 ).
b5 > b6 means that men salaries areincreasing faster than women's salaries.
years of experience
39yi = b3 Mi + b4 Fi + b5 Mi Xi + b6 Fi Xi + ei
b3b4
For males Mi = 1 and Fi = 0.For females Mi = 0 and Fi = 1.
b6
b5
yi
Xi
Male
Female
0
yi = b3 + b5 Xi + ei
yi = b4 + b6 Xi + ei
Females start with a higher starting salary, b4, while men get the lower starting salary, b3.But, men get a faster rate of increase intheir salaries, b5, which is higher than therate of increase for females, b6. ( b5 > b6 ).
years of experience
Chauvinist Industries Affirmative Action Plan
40yi = b2 Xi + b3 Mi + b4 Fi + ei
b2b3
b2
b4
yi
Xi
Male
Female
0
yi = b3 + b2 Xi + ei
yi = b4 + b2 Xi + ei
For males Mi = 1 and Fi = 0.For females Mi = 0 and Fi = 1.
Males and females have differentstarting salaries , b3 > b4 , but theirsalaries increase at the same rate, b2.
Back to our basic model:
years of experience
41 Since under our null hypothesis
the raw score test statistic: has a mean and a variance, we can standardize by subtracting the mean (zero) and dividing by the standard deviation (square root of the variance) to get the standardized test statistic:
β 3 – β4 = 0
b3 – b4
Var (b3 – b4 )
b3 – b4
42To test the null hypothesis:
H0: − =wecoulduse
thestandardizedteststatistic:
Z (b b ) 0
Var(b b )~ (0,1)
43If the variance of the y i , 2 ,
is unknown , then Var (b3 b4 )
is also unknown and must be
estimated from the expression :
Est.Var(b3b
4)
Est.Var(b3) Est.Var(b
4) 2 Est.Cov(b
3,b
4)
44 Use the sample variance as anestimator of the population variance:
Use s2 as an unbiased estimator of
where: s =(yi −ˆyi)
i=1
n
∑(n−k −1)
wherenisthenumberofobservations
andkisthenumberofindependent
variables.
45 The values for the following expressionare obtained in practice from the diagonaland off-diagonal elements of the estimated variance-covariance matrix:
Est . Var (b3
b4)
Est .Var (b3) Est . Var (b
4) 2 Est . Cov (b
3,b
4)
46
yi = b1 + b2 Xi + b3 Mi
b2(b1 + b3)
b2
b1
yi
Xi
Male
Female
0
yi = ( b1 + b3 ) + b2 Xi
yi = b1 + b2 Xi
Males and females have differentstarting salaries , b3 > 0 , but theirsalaries increase at the same rate, b2.
years of experience
Alternative: make women the default group
^
^
^
47
yi = b1 + b2 Xi + b3 Mi + b4 Di
yi = (b1 + b3 + b4) + b2 Xi
yi = (b1 + b4) + b2 Xi
yi = (b1 + b3) + b2 Xi
yi = b1 + b2 Xi
characteristic dummy variables:
male college grad:
female college grad:
male not a grad:
female not a grad:
^
^
^
^
^
48
years of experience0 X i
M-D (male-degree)
F-D (female-degree)
M-N (male-no degree)
F-N (female-no degree)
yiwage rate
very restrictive assumption
yi = b1 + b2 Xi + b3 Mi + b4 Di
b1b1+b3
b1+b4b1+b3+b4
very rigid !!!
^
49
Creating
Composite
Dummy Variables
( vs. characteristic dummy variables )
50
Job:
Gender:
Karnaugh map for gender vs. status of job:
S I
M 15 25 40
F 13 27 40
28 52 80
S = supervisor I = individual
men:
women:
51Occupation vs. Job vs. Gender
Gender:
Occupation:
Job:
C T US I S I S I
M 2 4 3 5 10 16 40
F 1 6 0 7 12 14 40
3 10 3 12 22 30 80
C = ComputerT = Other TechnicalU = Untechnical
52 Karnaugh Map for Occupation,
Job Status, Gender, and Degree Status:
Degree
NoDegree
C T US I S I S I
D M 1 3 2 5 6 13 30
F 0 3 0 6 7 8 24
N M 1 1 1 0 4 3 10
F 1 3 0 1 5 6 16
3 10 3 12 22 30 80
53composite dummy variables:
This defines combined( instead of separate )general characteristics.
yi = b1 + b2 Xi + b3 MNi + b4 FDi + b5 MDi
years of experience0 X i
M-D (male-degree)
F-D (female-degree)
M-N (male-no degree)
F-N (female-no degree)
yiwage rate
b1
b1 + b3
b1 + b4
b1 + b5
^
54
Multiple Regression Analysis
value of
residential property
( buying a home )
55Ai = bathrooms Xi = sq. ft. living space
H0: vs. H1:
H0: vs. H1:
ˆ Y i b1 b2Xi b3A i b4Ai Xi
b3Est. Varb3 ˜ tn 4
b4Est. Varb4 ˜ tn 4
56 Testing Ho: H1 : otherwise
and
( SSER
− SSEU
) / 2
SSEU
/ ( n − 4 )
∼ Fn − 4
2
SSE R yi b 1 b 2 X i 2
i 1
n
SSEU yi b1bXi bA ibA iX i2
i1
n
57Sale of House with Bed and Bath Dummies
800 0 0 0 10.0001000 0 0 1 20.0001200 1 0 0 30.0001500 1 0 0 40.0001800 1 0 1 50.0002000 1 0 1 60.0002200 0 1 0 70.000
2500 0 1 0 80.0003000 0 1 1 90.000
3500 0 1 1 100.000
PRICE = f ( SQFEET, D2BED, B3BED, A2BATH )
I. II. III. IV. PRICE (thousands)
I. SQFEET = square feet of living space II. D2BED = dummy=1 if two-bedroom house III. D3BED = dummy=1 if three-bedroom house IV. A2BATH = dummy=1 if two-bathroom house
58PRICE = f ( SQFEET, D2BED, B3BED, A2BATH )
Sale of House with Bed and Bath Dummies
ANALYSIS OF VARIANCE
SOURCE SUM-OF-SQUARES DF MEAN-SQ F-RATIO P
REGRESSION 8191.943 4 2047.986 176.378 0.000 RESIDUAL 58.057 5 11.611
DURBIN-WATSON D STATISTIC: 2.216FIRST ORDER AUTOCORRELATION COEFF: - 0.153
DEP VAR: PRICE N: 10 MULTIPLE R: 0.996 SQUARED MULTIPLE R: 0.993
ADJUSTED SQUARED MULTIPLE R: 0.987
STD ERROR OF ESTIMATE: 3.40
59PRICE = f ( SQFEET, D2BED, B3BED, A2BATH )
Sale of House with Bed and Bath Dummies
DEP VAR: PRICE N: 10 MULTIPLE R: 0.996
SQUARED MULTIPLE R: 0.993
ADJUSTED SQUARED MULTIPLE R: 0.987 STD ERROR OF ESTIMATE: 3.40 VARIABLE COEFF STD ERR T P(2-TAIL)
INTERCEPT - 6.482 4.112 -1.576 0.176 SQFEET 0.021 0.005 3.958 0.011 D2BED 14.662 4.871 3.010 0.030 D3BED 29.803 10.575 2.818 0.037 A2BATH 4.883 3.953 1.235 0.272 ( for 1,000 square feet: 21 - 6.482 = 14.518 or $14,518 )
60 VARIABLE COEFF STD ERR T P(2-TAIL)
INTERCEPT - 6.482 4.112 -1.576 0.176 SQFEET 0.021 0.005 3.958 0.011 D2BED 14.662 4.871 3.010 0.030 D3BED 29.803 10.575 2.818 0.037 A2BATH 4.883 3.953 1.235 0.272
for 1,000 square feet: 21 - 6.482 = 14.518 or $14,518
add a bathroom:
$14,518 4,883
$19,401
add a bedroom:
$14,518 14,662
$29,180
add 2 bedrooms:
$14,518 29,803
$44,321
add bath and 2 bedrooms: 14,518 + 4,883 + 29,803 = $49,204
Regression Analysis of Sale of Residential Property
61Sales Value of Residential Property
y = sales value of the property (dollars)X = square feet of living spaceD1=dummy vble for one bedroom homeD2=dummy vble for two bedroom homeD3=dummy vble for three bedroom homeA1=dummy vble for one bathroom homeA2=dummy vble for two bathroom home
For a one-bedroom, one-bathroom home, such that D2=0, D3=0, and A2=0, we have:
yib
1b
2X
ib
3D2
ib
4D3
ib
5A2i
^
yib
1 b
2X
i 1 bedroom , 1 bathroom^
62Sales Value of Residential Property
For a 2-bedroom, 1-bathroom home,
we have D2=1, D3=0, and A2=0
^
^
yib
1b
2X
ib
3D2
ib
4D3
ib
5A2 i
yi(b
1 b
3) b
2X
i 2 bedroom, 1 bathroom
63Sales Value of Residential Property
For a 1-bedroom, 2-bathroom home,
we have D2=0, D3=0, and A2=1
^
^
yib
1 b
2X
i b
3D2
i b
4D3
i b
5A2
i
yi(b
1 b
5) b
2X
i 1 bedroom, 2 bathroom
64Sales Value of Residential Property
For a 2-bedroom, 2-bathroom home, we have D2=1, D3=0, and A2=1
yib
1 b
2X
i b
3D2
i b
4D3
i b
5A2
i
^
yi (b
1 b
3 b
5) b
2X
i 2 bedroom , 2 bathroom
^
yi (b
1 b
4 b
5) b
2X
i 3 bedroom , 2 bathroom^
yi (b
1 b
4) b
2X
i 3 bedroom , 1 bathroom^
65
square feet of living space
0 X i
House Sales Model with Restricted Intercepts
b1bb
D2-A2 (two bed, two bath)
b1b
D2-A1 (two bed, one bath)
b1b
D1-A2 (one bed, two bath)
b1
D1-A1 (one bed,one bath)
yi
selling price
b1bb
D3-A2 (three bed, two bath)
b1b
D3-A1 (three bed, one bath)
b
yib
1 b
2X
i b
3D2
i b
4D3
i b
5A2
i
^
^
Rigid !!!
66
Creating
Composite
Dummy Variables
( vs. characteristic dummy variables )
67
Bath-rooms
How do we create composite dummy variables?
Need to account for the interactioneffect betweenbathrooms andbedrooms. 1 2 3
1 6 8 26 40
2 7 7 26 40
13 15 52 80
Bedrooms
68 Composite dummy variables are created for each nonempty cell.
Create six composite dummy variables:
D1A1=1 if one bed and one bath, or D1A1= 0
D1A2=1 if one bed and two bath, or D1A2= 0
D2A1=1 if two bed and one bath, or D2A1= 0
D2A2=1 if two bed and two bath, or D2A2= 0
D3A1=1 if three bed and one bath, or D3A1= 0
D3A2=1 if three bed and two bath, or D3A2= 0
69Sales Value of Residential Property
y = sales value of the property (dollars)X = square feet of living spaceD1A1 = interaction one-bed & one-bathD1A2 = interaction one-bed & two-bathD2A1 = interaction two-bed & one-bathD2A2 = interaction two-bed & two-bathD3A1 = interaction three-bed & one-bathD3A2 = interaction three-bed & two-bath
yib
1 b
2X
i b
3D1A2
i b
4D2A1i
b5D2A2 i
^
b6D3A1i
b7D3A2 i
70This one equation with all these dummyvariables actually is representing sixequations. You must substitute in foreach of the dummy variables to generatethe six equations that are implied by this one dummy variable equation.
For a one-bedroom, one-bathroom home, Since D1A1 = 1, while the others are zero:
yib
1 b
2X
i 1 bedroom , 1 bathroom
^
yib
1 b
2X
i b
3D1A2
i b
4D2A1i
b5D2A2 i
^
b6D3A1i
b7D3A2 i
71
square feet of living space
0 X i
House Sales Model with Unrestricted Intercepts
D2-A2 (two bed, two bath)
D2-A1 (two bed, one bath)
D1-A2 (one bed, two bath)
b1
D1-A1 (one bed,one bath)
yi
selling priceD3-A2 (three bed, two bath)
D3-A1 (three bed, one bath)
b
72
one-bedroom, two-bathroom
D1A2 =1, while the others are zero:
now graph it ! =======>
yi(
1 b
3) b
2X
i 1 bedroom, 2 bathroom^
yib
1 b
2X
i b
3D1A2
i b
4D2A1i
b5D2A2 i
^
b6D3A1i
b7D3A2 i
b
73
square feet of living space
0 X i
House Sales Model with Unrestricted Intercepts
D2-A2 (two bed, two bath)
b1b
D2-A1 (two bed, one bath)
D1-A2 (one bed, two bath)
b1
D1-A1 (one bed,one bath)
yi
selling price D3-A2 (three bed, two bath)
D3-A1 (three bed, one bath)
74
two-bedroom, one-bathroom
now graph it ! =======>
yi
(b1
b4
) b2X
i 2 bedroom, 1 bathroom^
yib
1 b
2X
i b
3D1A2
i b
4D2A1i
b5D2A2 i
^
b6D3A1i
b7D3A2 i
D2A1 =1, while the others are zero:
75
square feet of living space
0 X i
House Sales Model with Unrestricted Intercepts
D2-A2 (two bed, two bath)
b1b
D2-A1 (two bed, one bath)
b1b
D1-A2 (one bed, two bath)
b1
D1-A1 (one bed,one bath)
yi
selling price D3-A2 (three bed, two bath)
D3-A1 (three bed, one bath)
76
two-bedroom, two-bathroom
now graph it ! =======>
yi
(b1
b5
) b2X
i 2 bedroom, 2 bathroom^
yib
1 b
2X
i b
3D1A2
i b
4D2A1i
b5D2A2 i
^
b6D3A1i
b7D3A2 i
D2A2 =1, while the others are zero:
77
square feet of living space
0 X i
House Sales Model with Unrestricted Intercepts
b1b
D2-A2 (two bed, two bath)
b1b
D2-A1 (two bed, one bath)
b1b
D1-A2 (one bed, two bath)
b1
D1-A1 (one bed,one bath)
yi
selling priceD3-A2 (three bed, two bath)
D3-A1 (three bed, one bath)
78
square feet of living space
0 X i
House Sales Model with Unrestricted Intercepts
b1b
D2-A2 (two bed, two bath)
b1b
D2-A1 (two bed, one bath)
b1b
D1-A2 (one bed, two bath)
b1
D1-A1 (one bed,one bath)
yi
selling price
b1b
D3-A2 (three bed, two bath)
b1b
D3-A1 (three bed, one bath)
79
Creating
Composite
Dummy Variables
( vs. characteristic dummy variables )
80
Bath-rooms
How do we create composite dummy variables?
Need to account for the interactioneffect betweenbathrooms andbedrooms. 1 2 3
1 6 8 26 40
2 7 7 26 40
13 15 52 80
Bedrooms
81Bedrooms vs. Baths vs. Garage
Baths
Bedrooms
Cars inGarage:
1 2 3
1 2 1 2 1 2
1 2 4 3 5 10 16 40
2 1 6 0 7 12 14 40
3 10 3 12 22 30 80
82Karnaugh Map for Bedrooms,
Baths, Garage, and School:
Adams
SaintJoseph
1 2 31 2 1 2 1 2
A1 1 3 2 5 6 13 30
2 0 3 0 6 7 8 24
J1 1 1 1 0 4 3 10
2 1 3 0 1 5 6 16
3 10 3 12 22 30 80