Professional Documents
Culture Documents
Methods II
Dummy Variables &
Interaction Effects
1
The Homogeneity Assumption
OLS assumes all cases in your data are
comparable
x’s are a sample drawn from a single
population
But we may analyze distinct groups of
cases together in one analysis
Mean value of y may differ by group
2
Qualitative Variables
These group effects remain as part of the
error term
If groups differ in their distribution of x’s,
then we get a correlation between the X
variables and the error term
Violates assumption: cov(Xi, ui)=E(u)=0
3
Testing for Differences Across
Groups (p. 249-252)
The Chow Test:
The Chow Test 2. Is only valid under homoskedasticity (the
error variance for the two groups must be
i.e. Testing for difference between equal).males and females on
academic performance.
3. The null hypothesis is that there is no
[ SSR p ( SSR SSR )] [n 2(k 1)]
difference at all; either in the intercept or
1 slope between
2
F the
* the two groups.
SSR4.1 This
SSRmay k in1these
2 be two restrictive
SSR1=Males only;cases,
SSRwe 2
should allow dummy variables
=Females only
and dummy interactions to allow us to
SSRur=SSR1+SSR predict
2 different slopes and intercepts for
the two groups.
SSRP=SSRr=Pooling across both groups
4
Example: Democracy
But if Democracies are more & Tariffs
likely to be in RTA’s, then
pooling RTA and 40
35
non-RTA
Here westates
see that
biases the
30 coefficient
Percent Tariffs
democracies have 25
lower tariffs 20
15
Pooled Data
10
5
0
Here we see that Dictator Oligarch Anocracy Democracy
states in Regional 50
Trading 45
40
Percent Tariffs
Arrangements 35
30 RTA
(RTA’s) have lower 25
20
No RTA
Pooled Data
tariffs 15
10
5
0
Dictator Oligarch Anocracy Democracy
5
Solution: The Qualitative
Variable
Measure this group difference (RTA vs.
Non-RTA) and specify it as an x
This eliminates bias
But we have no numerical scale to
measure RTA’s
Create a categorical variable that captures
this group difference
6
The Qualitative “Dummy”
Create a variable that equals 1 when a case is
part of a group, 0 otherwise
This variable creates a new intercept for the
cases in the group marked by the dummy
Specifically, how would we interpret:
7
Democracy and Tariff Barriers
50
45
40
35
Percent Tariffs
30
RTA
25
No RTA
20
15
10
5
0
Dictator Oligarch Anocracy Democracy
̂1
̂1
ˆ0 ˆ2
̂1
̂ 0 yˆ ˆ0 ˆ1 x1 ˆ2 x2 if x2 0
̂ 0
11
Multiple Category Dummies
Create 4 separate dummy variables - 1 for
each region
Include all except one of these dummies in
the equation
If you include all 4 dummies you get
perfect collinearity with the constant. The
fourth dummy will drop out.
Americas+Europe+Asia+Africa=1
12
Interpreting Multi-Category
Dummies
Each coefficient compares the mean for that group to the
mean in the excluded category
Thus if:
βhat2-βhat4 compare the mean tariff in each region to the
mean in the Americas
TARIFF ˆ0 ˆ1 DEM ˆ2 EUR ˆ3 ASIA ˆ4 AFR uˆ
Mean in Americas is βhat0
An alternative strategy is to drop the constant and run all
dummies, as discussed last week.
13
Dumb Dummies
Dummy variables are easy, flexible ways
to measure categorical concepts
They CAN be just labels for ignorance
Try to use dummies to capture theoretical
constructs not empirical observations
If possible, measure the theoretical
construct more directly
14
Interaction Effects
Dummy variables specify new intercepts
Other slope coefficients in the equation do
not change
OLS assumes that the slopes of
continuous variables are constant across
all cases
What if slopes are different for different
groups in our sample?
15
Interaction Effects: An Example
What if the effect of democracy on tariffs
depends on whether the state is in an RTA?
16
Interaction Effects: An Illustration
(Notice that democracy has been converted to a dummy as
well for illustration purposes)
35
30
Percent Tariffs
25
20 RTA
15 No RTA
10
5
0
Non-Dem Democracy
25
20 RTA
15 No RTA
10
5
0
Non-Dem Democracy
21
Substantive Effects of Dummy
Interactions
No RTA RTA
22
Interactions with Continuous
Variables
The exact same logic about interactions applies if
Βhat1 depends on a continuous variable
y ˆ0 ˆ1x1 ˆ2 x 2 uˆ
ˆ ˆ ˆ x
1 0 1 2
̂1
27
Examples of
interaction effects
from my own research
28
Governance and Economic Welfare
2 004 G DP per capita (in M illions of Con stant 199 4 VN D)
15 Figure 4: PCI Performance and Economic Welfare
level of development
5
0
0 20 40 60 80 10 0
Structura l E n dowments (Infrastructure, H uma n C a pital, Proxim ity to M arkets)
29
Predicted Number of Loans by Legal Status
among Vietnamese Private Firms
Land Use Rights Certificate
30
Predicted Probability of Provincial Division in
Vietnam
Predicted Probablity of Provincial Division
(By State Sector Output with Number of Cabinet Officials)
.4 .5 .6 .7 .8
0 .2 .4 .6 .8 1
State Contribution to Provincial Output
31
32
33