Ecological Inference

Advanced Quantitative Research Methodology Lecture
Notes: Ecological Inference1
Gary King
http://GKing.Harvard.Edu
January 28, 2012
1
c
Copyright
2008 Gary King, All Rights Reserved.
Gary King http://GKing.Harvard.Edu ()
Advanced Quantitative Research Methodology Lecture Notes:
January
Ecological
28, 2012
Inference 1 / 38
Reading
Reading: Gary King. A Solution to the Ecological Inference Problem: Reconstructing
Individual Behavior from Aggregate Data.
Princeton University Press, 1997
Gary King ()
Ecological Inference
2 / 38
Preliminaries
Gary King ()
Ecological Inference
3 / 38
Preliminaries
Definition: Ecological Inference is the process of using aggregate (i.e.,
“ecological”) data to infer discrete individual-level relationships of
interest when individual-level data are not available.
Gary King ()
Ecological Inference
3 / 38
Preliminaries
Definition: Ecological Inference is the process of using aggregate (i.e.,
“ecological”) data to infer discrete individual-level relationships of
interest when individual-level data are not available.
History of the Problem:
Gary King ()
Ecological Inference
3 / 38
Preliminaries
Definition: Ecological Inference is the process of using aggregate (i.e.,
“ecological”) data to infer discrete individual-level relationships of
interest when individual-level data are not available.
History of the Problem:
1. Ogburn and Goltra (1919) in the very first multivariate statistical
analysis of politics in a political science journal made ecological
inferences and recognized the problem. The big issue in 1919: are the
newly enfranchised women going to take over the political system?
They regressed votes in referenda in Oregon precincts on the percent of
women in each precinct. But they worried:
Gary King ()
Ecological Inference
3 / 38
Preliminaries
Definition: Ecological Inference is the process of using aggregate (i.e.,
“ecological”) data to infer discrete individual-level relationships of
interest when individual-level data are not available.
History of the Problem:
1. Ogburn and Goltra (1919) in the very first multivariate statistical
analysis of politics in a political science journal made ecological
inferences and recognized the problem. The big issue in 1919: are the
newly enfranchised women going to take over the political system?
They regressed votes in referenda in Oregon precincts on the percent of
women in each precinct. But they worried:
It is also theoretically possible to gerrymander the precincts in such a
way that there may be a negative correlative even though men and
women each distribute their votes 50 to 50 on a given
measure. . . (Ogburn and Goltra, 1919).
Gary King ()
Ecological Inference
3 / 38
Preliminaries
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
(a) several literatures to wither, including studies of local and regional
politics through aggregate electoral statistics in favor of survey research
based on national samples.
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
(a) several literatures to wither, including studies of local and regional
politics through aggregate electoral statistics in favor of survey research
based on national samples.
(b) the development of a methodological literature devoted to solving the
problem.
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
(a) several literatures to wither, including studies of local and regional
politics through aggregate electoral statistics in favor of survey research
based on national samples.
(b) the development of a methodological literature devoted to solving the
problem.
3. Hundreds of other articles have helped us understand the problem.
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
(a) several literatures to wither, including studies of local and regional
politics through aggregate electoral statistics in favor of survey research
based on national samples.
(b) the development of a methodological literature devoted to solving the
problem.
3. Hundreds of other articles have helped us understand the problem.
History of Solutions: A 45-year war between supporters of
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
(a) several literatures to wither, including studies of local and regional
politics through aggregate electoral statistics in favor of survey research
based on national samples.
(b) the development of a methodological literature devoted to solving the
problem.
3. Hundreds of other articles have helped us understand the problem.
History of Solutions: A 45-year war between supporters of
1. Duncan and Davis (1953): a deterministic solution.
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
(a) several literatures to wither, including studies of local and regional
politics through aggregate electoral statistics in favor of survey research
based on national samples.
(b) the development of a methodological literature devoted to solving the
problem.
3. Hundreds of other articles have helped us understand the problem.
History of Solutions: A 45-year war between supporters of
1. Duncan and Davis (1953): a deterministic solution.
2. Goodman (1953, 1959): a statistical solution.
Gary King ()
Ecological Inference
4 / 38
Preliminaries
2. Robinson’s (1950) clarified the problem, causing:
(a) several literatures to wither, including studies of local and regional
politics through aggregate electoral statistics in favor of survey research
based on national samples.
(b) the development of a methodological literature devoted to solving the
problem.
3. Hundreds of other articles have helped us understand the problem.
History of Solutions: A 45-year war between supporters of
1. Duncan and Davis (1953): a deterministic solution.
2. Goodman (1953, 1959): a statistical solution.
3. for 50 years, no other methods used in applications.
Gary King ()
Ecological Inference
4 / 38
If you can avoid making ecological inferences, do so!
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
1. Public policy: Applying the Voting Rights Act.
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
1. Public policy: Applying the Voting Rights Act.
2. History: Who voted for the Nazi’s?
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
1. Public policy: Applying the Voting Rights Act.
2. History: Who voted for the Nazi’s?
3. Marketing: What types of people buy your products?
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
1. Public policy: Applying the Voting Rights Act.
2. History: Who voted for the Nazi’s?
3. Marketing: What types of people buy your products?
4. Banking: Are banks complying with red-lining laws? Are there areas
with certain types of people who might take out loans but have not?
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
1. Public policy: Applying the Voting Rights Act.
2. History: Who voted for the Nazi’s?
3. Marketing: What types of people buy your products?
4. Banking: Are banks complying with red-lining laws? Are there areas
with certain types of people who might take out loans but have not?
5. Candidates for office: How do good representatives decide what
policies they should favor? How can candidates tailor campaign appeals
and target voter groups?
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
1. Public policy: Applying the Voting Rights Act.
2. History: Who voted for the Nazi’s?
3. Marketing: What types of people buy your products?
4. Banking: Are banks complying with red-lining laws? Are there areas
with certain types of people who might take out loans but have not?
5. Candidates for office: How do good representatives decide what
policies they should favor? How can candidates tailor campaign appeals
and target voter groups?
6. Sociology: Do the unemployed commit more crimes or is it just that
there are more crimes in unemployed areas?
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
1. Public policy: Applying the Voting Rights Act.
2. History: Who voted for the Nazi’s?
3. Marketing: What types of people buy your products?
4. Banking: Are banks complying with red-lining laws? Are there areas
with certain types of people who might take out loans but have not?
5. Candidates for office: How do good representatives decide what
policies they should favor? How can candidates tailor campaign appeals
and target voter groups?
6. Sociology: Do the unemployed commit more crimes or is it just that
there are more crimes in unemployed areas?
7. Economics: With some exceptions, most theories are based on
assumptions about individuals, but most data are on groups.
Gary King ()
Ecological Inference
5 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
8. Education: Do students who attend private schools through a voucher
system do as well as students who can afford to attend on their own?
Gary King ()
Ecological Inference
6 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
8. Education: Do students who attend private schools through a voucher
system do as well as students who can afford to attend on their own?
9. Atmospheric physics: How can we tell which types of the vehicles
actually on the roads emit more carbon dioxide and carbon monoxide?
Gary King ()
Ecological Inference
6 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
8. Education: Do students who attend private schools through a voucher
system do as well as students who can afford to attend on their own?
9. Atmospheric physics: How can we tell which types of the vehicles
actually on the roads emit more carbon dioxide and carbon monoxide?
10. Oceanography: How many marine organisms of a certain type were
collected at a given depth, from fishing nets dropped from the surface
down through a variety of depths.
Gary King ()
Ecological Inference
6 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
8. Education: Do students who attend private schools through a voucher
system do as well as students who can afford to attend on their own?
9. Atmospheric physics: How can we tell which types of the vehicles
actually on the roads emit more carbon dioxide and carbon monoxide?
10. Oceanography: How many marine organisms of a certain type were
collected at a given depth, from fishing nets dropped from the surface
down through a variety of depths.
11. Epidemiology: Does radon cause lung cancer?
Gary King ()
Ecological Inference
6 / 38
If you can avoid making ecological inferences, do so!
Some of those who aren’t so lucky:
8. Education: Do students who attend private schools through a voucher
system do as well as students who can afford to attend on their own?
9. Atmospheric physics: How can we tell which types of the vehicles
actually on the roads emit more carbon dioxide and carbon monoxide?
10. Oceanography: How many marine organisms of a certain type were
collected at a given depth, from fishing nets dropped from the surface
down through a variety of depths.
11. Epidemiology: Does radon cause lung cancer?
12. Changes in public opinion: How to use repeated independent
cross-sectional surveys to measure individual change?
Gary King ()
Ecological Inference
6 / 38
The Problem: The District Level
Race of
Voting Age
Voting Decision
Person Democrat
black
white
Republican
No vote
?
?
?
?
?
?
19,896
10,936
49,928
55,054
25,706
80,760
The Ecological Inference Problem at the District-Level: The 1990
Election to the Ohio State House, District 42. The goal is to infer
from the marginal entries (each of which is the sum of the corresponding row or column) to the cell entries. (Note information in the
bounds.)
Gary King ()
Ecological Inference
7 / 38
The Problem: The Precinct Level
Race of
Voting Age
Voting Decision
Person Democrat
black
white
Republican
No vote
?
?
?
?
?
?
130
92
483
221
484
705
The Ecological Inference Problem at the Precinct-Level: Precinct P
in District 42 (1 of 131 in the district). The goal is to infer from the
margins of a set of tables like this one to the cell entries in each.
Gary King ()
Ecological Inference
8 / 38
The best we could do, circa 1996
Year
1986
1988
District
12
23
29
31
42
45
12
23
29
31
42
45
Estimated Percent of Blacks
Voting for the Democratic Candidate
95.65%
100.06
103.47
98.92
108.41
93.58
95.67
102.64
105.00
100.20
111.05
97.49
Sample Ecological Inferences: All Ohio State House districts where an
African American Democrat ran against a white Republican, 1986–
1990 (Source: “Statement of Gordon G. Henderson,” presented as an
exhibit in federal court, using Goodman’s regression). Figures above
100% are logically impossible.
Gary King ()
Ecological Inference
9 / 38
The best we could do, circa 1996: Continued
Year
1990
District
12
14
16
23
25
29
31
36
37
42
45
Estimated Percent of Blacks
Voting for the Democratic Candidate
94.79%
97.83
94.36
101.09
98.83
103.42
102.17
101.35
101.39
109.63
97.62
Sample Ecological Inferences: All Ohio State House districts where an
African American Democrat ran against a white Republican, 1986–
1990 (Source: “Statement of Gordon G. Henderson,” presented as an
exhibit in federal court, using Goodman’s regression). Figures above
100% are logically impossible.
Gary King ()
Ecological Inference
10 / 38
What Information Does The New Method Provide?
Goodman’s Method: One incorrect number (5 standard deviations outside the
deterministic bounds)
Gary King ()
Ecological Inference
11 / 38
What Information Does The New Method Provide?
Goodman’s Method: One incorrect number (5 standard deviations outside the
deterministic bounds)
The New Method:
Gary King ()
Ecological Inference
11 / 38
What Information Does The New Method Provide?
Goodman’s Method: One incorrect number (5 standard deviations outside the
deterministic bounds)
The New Method:
Non-minority Turnout in New Jersey Cities and Towns. In contrast to the best existing
methods, which provide one (incorrect) number for the entire state, the method offered
here gives an accurate estimate of white turnout for all 567 minor civil divisions in the
state, a few of which are labeled.
Gary King ()
Ecological Inference
11 / 38
Notation
Vote No vote
black βib
1 − βib Xi
white βiw
1 − βiw 1 − Xi
Ti
1 − Ti
Notation for Precinct i (i = 1, . . . , p).
Gary King ()
Ecological Inference
12 / 38
Notation
Vote No vote
black βib
1 − βib Xi
white βiw
1 − βiw 1 − Xi
Ti
1 − Ti
Notation for Precinct i (i = 1, . . . , p).
Observed variables:
Gary King ()
Ecological Inference
12 / 38
Notation
Vote No vote
black βib
1 − βib Xi
white βiw
1 − βiw 1 − Xi
Ti
1 − Ti
Notation for Precinct i (i = 1, . . . , p).
Observed variables:
Ti = voter Turnout in precinct i
Gary King ()
Ecological Inference
12 / 38
Notation
Vote No vote
black βib
1 − βib Xi
white βiw
1 − βiw 1 − Xi
Ti
1 − Ti
Notation for Precinct i (i = 1, . . . , p).
Observed variables:
Ti = voter Turnout in precinct i
Xi = Black proportion of Voting Age Population in precinct i
Gary King ()
Ecological Inference
12 / 38
Notation
Vote No vote
black βib
1 − βib Xi
white βiw
1 − βiw 1 − Xi
Ti
1 − Ti
Notation for Precinct i (i = 1, . . . , p).
Observed variables:
Ti = voter Turnout in precinct i
Xi = Black proportion of Voting Age Population in precinct i
Unobserved quantities of interest:
Gary King ()
Ecological Inference
12 / 38
Notation
Vote No vote
black βib
1 − βib Xi
white βiw
1 − βiw 1 − Xi
Ti
1 − Ti
Notation for Precinct i (i = 1, . . . , p).
Observed variables:
Ti = voter Turnout in precinct i
Xi = Black proportion of Voting Age Population in precinct i
Unobserved quantities of interest:
βib = fraction of blacks who vote in precinct i
Gary King ()
Ecological Inference
12 / 38
Notation
Vote No vote
black βib
1 − βib Xi
white βiw
1 − βiw 1 − Xi
Ti
1 − Ti
Notation for Precinct i (i = 1, . . . , p).
Observed variables:
Ti = voter Turnout in precinct i
Xi = Black proportion of Voting Age Population in precinct i
Unobserved quantities of interest:
βib = fraction of blacks who vote in precinct i
βiw = fraction of whites who vote in precinct i
Gary King ()
Ecological Inference
12 / 38
Notation
An accounting identity (a fact, not an assumption):
Gary King ()
Ecological Inference
13 / 38
Notation
An accounting identity (a fact, not an assumption):
Ti = βib Xi + βiw (1 − Xi )
Gary King ()
Ecological Inference
13 / 38
Notation
An accounting identity (a fact, not an assumption):
Ti = βib Xi + βiw (1 − Xi )
= βiw + (βib − βiw )Xi
Gary King ()
Ecological Inference
13 / 38
Notation
An accounting identity (a fact, not an assumption):
Ti = βib Xi + βiw (1 − Xi )
= βiw + (βib − βiw )Xi
Goodman’s regression:
Gary King ()
Ecological Inference
13 / 38
Notation
An accounting identity (a fact, not an assumption):
Ti = βib Xi + βiw (1 − Xi )
= βiw + (βib − βiw )Xi
Goodman’s regression:
Run a regression of Ti on Xi and (1 − Xi ) (no constant term). Coefficients
are intended to be:
Gary King ()
Ecological Inference
13 / 38
Notation
An accounting identity (a fact, not an assumption):
Ti = βib Xi + βiw (1 − Xi )
= βiw + (βib − βiw )Xi
Goodman’s regression:
Run a regression of Ti on Xi and (1 − Xi ) (no constant term). Coefficients
are intended to be:
B b , District-wide black turnout
Gary King ()
Ecological Inference
13 / 38
Notation
An accounting identity (a fact, not an assumption):
Ti = βib Xi + βiw (1 − Xi )
= βiw + (βib − βiw )Xi
Goodman’s regression:
Run a regression of Ti on Xi and (1 − Xi ) (no constant term). Coefficients
are intended to be:
B b , District-wide black turnout
B w , District-wide white turnout
Gary King ()
Ecological Inference
13 / 38
Selected Problems with the Goodman’s Approach
Gary King ()
Ecological Inference
14 / 38
Selected Problems with the Goodman’s Approach
If we follow Goodman’s advice, we won’t apply the model.
Gary King ()
Ecological Inference
14 / 38
Selected Problems with the Goodman’s Approach
If we follow Goodman’s advice, we won’t apply the model.
If we don’t follow Goodman’s advice & apply it anyway:
Gary King ()
Ecological Inference
14 / 38
Selected Problems with the Goodman’s Approach
If we follow Goodman’s advice, we won’t apply the model.
If we don’t follow Goodman’s advice & apply it anyway:
1. We know parameters are not constant
1
.75
T i .5
Precincts in Marion County, Indiana: Voter Turnout for the
U.S. Senate by Fraction Black,
1990.
.25
0
0
Gary King ()
.25
.5
Xi
.75
1
Ecological Inference
14 / 38
Selected Problems with the Goodman’s Approach
The accounting identity, Ti = βib Xi + βiw (1 − Xi ), contains no error
other than due to parameter variation. Thus, all scatter around the
regression line is due to parameter variation.
Gary King ()
Ecological Inference
15 / 38
Selected Problems with the Goodman’s Approach
The accounting identity, Ti = βib Xi + βiw (1 − Xi ), contains no error
other than due to parameter variation. Thus, all scatter around the
regression line is due to parameter variation.
2. Goodman’s model does not take into account information from the
method of bounds or from massive heteroskedasticity in aggregate
data. See the graph.
Gary King ()
Ecological Inference
15 / 38
Selected Problems with the Goodman’s Approach
The accounting identity, Ti = βib Xi + βiw (1 − Xi ), contains no error
other than due to parameter variation. Thus, all scatter around the
regression line is due to parameter variation.
2. Goodman’s model does not take into account information from the
method of bounds or from massive heteroskedasticity in aggregate
data. See the graph.
3. Goodman’s regression is biased in the presence of aggregation bias:
C (βib , Xi ) 6= 0 or C (βiw , Xi ) 6= 0 (True in any regression even if not
ecological.)
Gary King ()
Ecological Inference
15 / 38
Selected Problems with the Goodman’s Approach
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
(b) More specifically, even if C (βib , Xi ) 6= 0, if we control for Zi it might be
true that C (βib , Xi |Zi ) = 0. And if Zi = Xi , its true for sure.
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
(b) More specifically, even if C (βib , Xi ) 6= 0, if we control for Zi it might be
true that C (βib , Xi |Zi ) = 0. And if Zi = Xi , its true for sure.
(c) Take Goodman’s regression E (Ti ) = B b Xi + B w (1 − Xi )
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
(b) More specifically, even if C (βib , Xi ) 6= 0, if we control for Zi it might be
true that C (βib , Xi |Zi ) = 0. And if Zi = Xi , its true for sure.
(c) Take Goodman’s regression E (Ti ) = B b Xi + B w (1 − Xi )
(d) Let B b = γ0 + γ1 Xi and B w = θ0 + θ1 Xi and substitute:
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
(b) More specifically, even if C (βib , Xi ) 6= 0, if we control for Zi it might be
true that C (βib , Xi |Zi ) = 0. And if Zi = Xi , its true for sure.
(c) Take Goodman’s regression E (Ti ) = B b Xi + B w (1 − Xi )
(d) Let B b = γ0 + γ1 Xi and B w = θ0 + θ1 Xi and substitute:
E (Ti ) = (γ0 + γ1 Xi )Xi + (θ0 + θ1 Xi )(1 − Xi )
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
(b) More specifically, even if C (βib , Xi ) 6= 0, if we control for Zi it might be
true that C (βib , Xi |Zi ) = 0. And if Zi = Xi , its true for sure.
(c) Take Goodman’s regression E (Ti ) = B b Xi + B w (1 − Xi )
(d) Let B b = γ0 + γ1 Xi and B w = θ0 + θ1 Xi and substitute:
E (Ti ) = (γ0 + γ1 Xi )Xi + (θ0 + θ1 Xi )(1 − Xi )
= θ0 + (γ0 + θ1 − θ0 )Xi − (γ1 − θ1 )Xi2
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
(b) More specifically, even if C (βib , Xi ) 6= 0, if we control for Zi it might be
true that C (βib , Xi |Zi ) = 0. And if Zi = Xi , its true for sure.
(c) Take Goodman’s regression E (Ti ) = B b Xi + B w (1 − Xi )
(d) Let B b = γ0 + γ1 Xi and B w = θ0 + θ1 Xi and substitute:
E (Ti ) = (γ0 + γ1 Xi )Xi + (θ0 + θ1 Xi )(1 − Xi )
= θ0 + (γ0 + θ1 − θ0 )Xi − (γ1 − θ1 )Xi2
(e) Model is not identified: Four parameters need to be estimated (γ0 , γ1 , θ0 ,
and θ1 ), but only 3 can be estimated (θ0 and coefficients in parens on Xi
and Xi2 ).
Gary King ()
Ecological Inference
16 / 38
Selected Problems with the Goodman’s Approach
4. We cannot correct for aggregation bias within Goodman’s framework.
(a) The good idea that doesn’t work: since the coefficients vary with Xi , let’s
model that explicitly, hence using Xi to control for the covariation.
(b) More specifically, even if C (βib , Xi ) 6= 0, if we control for Zi it might be
true that C (βib , Xi |Zi ) = 0. And if Zi = Xi , its true for sure.
(c) Take Goodman’s regression E (Ti ) = B b Xi + B w (1 − Xi )
(d) Let B b = γ0 + γ1 Xi and B w = θ0 + θ1 Xi and substitute:
E (Ti ) = (γ0 + γ1 Xi )Xi + (θ0 + θ1 Xi )(1 − Xi )
= θ0 + (γ0 + θ1 − θ0 )Xi − (γ1 − θ1 )Xi2
(e) Model is not identified: Four parameters need to be estimated (γ0 , γ1 , θ0 ,
and θ1 ), but only 3 can be estimated (θ0 and coefficients in parens on Xi
and Xi2 ).
5. If the number of people differs across precinct, Goodman’s model is not
estimating the correct quantity of interest.
Gary King ()
Ecological Inference
16 / 38
The Data
1
.75
T i .5
.25
0
0
.25
.5
Xi
.75
1
A Scattercross Graph of Voter Turnout by Fraction Hispanic
Gary King ()
Ecological Inference
17 / 38
The Data
1
.75
T i .5
.25
0
0
.25
.5
Xi
.75
1
A Scattercross Graph of Voter Turnout by Fraction Hispanic
Solve the accounting identity:
Gary King ()
Ecological Inference
17 / 38
The Data
1
.75
T i .5
.25
0
0
.25
.5
Xi
.75
1
A Scattercross Graph of Voter Turnout by Fraction Hispanic
Solve the accounting identity:
Ti = βiw + (βib − βiw )Xi
Gary King ()
Ecological Inference
17 / 38
The Data
1
.75
T i .5
.25
0
0
.25
.5
Xi
.75
1
A Scattercross Graph of Voter Turnout by Fraction Hispanic
Solve the accounting identity:
Ti = βiw + (βib − βiw )Xi
for the unknowns:
Gary King ()
Ecological Inference
17 / 38
The Data
1
.75
T i .5
.25
0
0
.25
.5
Xi
.75
1
A Scattercross Graph of Voter Turnout by Fraction Hispanic
Solve the accounting identity:
Ti = βiw + (βib − βiw )Xi
for the unknowns:
βiw =
Gary King ()
„
Ti
1 − Xi
„
«
−
Xi
1 − Xi
Ecological Inference
«
βib
17 / 38
The Data: Continued
Precinct 52: T52 = .19, X52 = .88
Gary King ()
Ecological Inference
18 / 38
The Data: Continued
Precinct 52: T52 = .19, X52 = .88
w
β52
=
Gary King ()
T52
X52
−
βb
1 − X52 1 − X52 52
Ecological Inference
18 / 38
The Data: Continued
Precinct 52: T52 = .19, X52 = .88
T52
X52
−
βb
1 − X52 1 − X52 52
.19
.88
=
−
βb
1 − .88 1 − .88 52
w
β52
=
Gary King ()
Ecological Inference
18 / 38
The Data: Continued
Precinct 52: T52 = .19, X52 = .88
T52
X52
−
βb
1 − X52 1 − X52 52
.19
.88
=
−
βb
1 − .88 1 − .88 52
b
= 1.58 − 7.33β52
w
β52
=
Gary King ()
Ecological Inference
18 / 38
The Data: Continued
Precinct 52: T52 = .19, X52 = .88
T52
X52
−
βb
1 − X52 1 − X52 52
.19
.88
=
−
βb
1 − .88 1 − .88 52
b
= 1.58 − 7.33β52
w
β52
=
1
.75
w
β i .5
.25
0
0
Gary King ()
.25
.5
b
.75
βi
Ecological Inference
1
18 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
Gary King ()
Ecological Inference
19 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
The Goal: Knowledge of βib and βiw in each precinct.
Gary King ()
Ecological Inference
19 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
The Goal: Knowledge of βib and βiw in each precinct.
Begin with the basic accounting identity (not an assumption of linearity):
Gary King ()
Ecological Inference
19 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
The Goal: Knowledge of βib and βiw in each precinct.
Begin with the basic accounting identity (not an assumption of linearity):
Ti = βib Xi + βiw (1 − Xi )
Gary King ()
Ecological Inference
19 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
The Goal: Knowledge of βib and βiw in each precinct.
Begin with the basic accounting identity (not an assumption of linearity):
Ti = βib Xi + βiw (1 − Xi )
add three assumptions (in the basic version of the model):
Gary King ()
Ecological Inference
19 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
The Goal: Knowledge of βib and βiw in each precinct.
Begin with the basic accounting identity (not an assumption of linearity):
Ti = βib Xi + βiw (1 − Xi )
0.1 0.2 0.3 0.4 0.5 0.6
0
0
2
2
4
4
6
6
8
8
add three assumptions (in the basic version of the model):
1. βib and βiw are truncated bivariate normal:
1
1
0.8
0.6
βwi
0.4
0.2
0
0.2
0
0.4
0.6
0.8
βbi
1
0.8
0.6
βwi
0.4
0.2
0
0.2
0
0.4
0.6
0.8
βbi
1
1
0.8
0.6
βwi
0.4
0.2
0
(a) 0.5 0.5 0.15 0.15 0
Gary King ()
(b) 0.1 0.9 0.15 0.15 0
Ecological Inference
0.2
0
0.4
0.6
0.8
1
βbi
(c) 0.8 0.8 0.6 0.6 0.5
19 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
The Goal: Knowledge of βib and βiw in each precinct.
Begin with the basic accounting identity (not an assumption of linearity):
Ti = βib Xi + βiw (1 − Xi )
0.1 0.2 0.3 0.4 0.5 0.6
0
0
2
2
4
4
6
6
8
8
add three assumptions (in the basic version of the model):
1. βib and βiw are truncated bivariate normal:
1
1
0.8
0.6
βwi
0.4
0.2
0
0.2
0
0.4
0.6
0.8
βbi
1
0.8
0.6
βwi
0.4
0.2
0
0.2
0
0.4
0.6
0.8
βbi
1
1
0.8
0.6
βwi
0.4
0.2
0
(a) 0.5 0.5 0.15 0.15 0
(b) 0.1 0.9 0.15 0.15 0
0.2
0
0.4
0.6
0.8
1
βbi
(c) 0.8 0.8 0.6 0.6 0.5
(The 5 parameters of this density need to be estimated by forming the
likelihood.)
Gary King ()
Ecological Inference
19 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
Gary King ()
Ecological Inference
20 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
2. No aggregation bias (a priori): βib and βiw mean independent of Xi .
Allows a posteriori aggregation bias (i.e., after conditioning on Ti )
Gary King ()
Ecological Inference
20 / 38
The Model for Data Without Aggregation Bias, But
Robust in its Presence
2. No aggregation bias (a priori): βib and βiw mean independent of Xi .
Allows a posteriori aggregation bias (i.e., after conditioning on Ti )
3. No spatial autocorrelation: Ti |Xi are independent over observations.
Gary King ()
Ecological Inference
20 / 38
Deriving the Likelihood Function
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
(c) Finally, we learn Ti , which is computed via the accounting identity
deterministically: Ti = βib Xi + βiw (1 − Xi ).
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
(c) Finally, we learn Ti , which is computed via the accounting identity
deterministically: Ti = βib Xi + βiw (1 − Xi ).
2. The random variable is then T (given X ), which is truncated bivarate normal
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
(c) Finally, we learn Ti , which is computed via the accounting identity
deterministically: Ti = βib Xi + βiw (1 − Xi ).
2. The random variable is then T (given X ), which is truncated bivarate normal
3. The five parameters of the truncated bivariate normal need to be estimated:
ψ̆ = {B̆b , B̆w , σ̆b , σ̆w , ρ̆} = {B̆, Σ̆}
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
(c) Finally, we learn Ti , which is computed via the accounting identity
deterministically: Ti = βib Xi + βiw (1 − Xi ).
2. The random variable is then T (given X ), which is truncated bivarate normal
3. The five parameters of the truncated bivariate normal need to be estimated:
ψ̆ = {B̆b , B̆w , σ̆b , σ̆w , ρ̆} = {B̆, Σ̆}
These are on the untruncated scale (and not quantities of interest) since:
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
(c) Finally, we learn Ti , which is computed via the accounting identity
deterministically: Ti = βib Xi + βiw (1 − Xi ).
2. The random variable is then T (given X ), which is truncated bivarate normal
3. The five parameters of the truncated bivariate normal need to be estimated:
ψ̆ = {B̆b , B̆w , σ̆b , σ̆w , ρ̆} = {B̆, Σ̆}
These are on the untruncated scale (and not quantities of interest) since:
TN(βib , βiw |B̆, Σ̆) = N(βib , βiw |B̆, Σ̆)
Gary King ()
Ecological Inference
1(βib , βiw )
R(B̆, Σ̆)
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
(c) Finally, we learn Ti , which is computed via the accounting identity
deterministically: Ti = βib Xi + βiw (1 − Xi ).
2. The random variable is then T (given X ), which is truncated bivarate normal
3. The five parameters of the truncated bivariate normal need to be estimated:
ψ̆ = {B̆b , B̆w , σ̆b , σ̆w , ρ̆} = {B̆, Σ̆}
These are on the untruncated scale (and not quantities of interest) since:
TN(βib , βiw |B̆, Σ̆) = N(βib , βiw |B̆, Σ̆)
1(βib , βiw )
R(B̆, Σ̆)
where
Gary King ()
Ecological Inference
21 / 38
Deriving the Likelihood Function
1. The story of the model is that we learn things in order
(a) (As in regression), everything is conditional on Xi , which means we learn
it first.
(b) Then the world draws βib and βiw from a truncated normal, but we don’t
get to see them.
(c) Finally, we learn Ti , which is computed via the accounting identity
deterministically: Ti = βib Xi + βiw (1 − Xi ).
2. The random variable is then T (given X ), which is truncated bivarate normal
3. The five parameters of the truncated bivariate normal need to be estimated:
ψ̆ = {B̆b , B̆w , σ̆b , σ̆w , ρ̆} = {B̆, Σ̆}
These are on the untruncated scale (and not quantities of interest) since:
TN(βib , βiw |B̆, Σ̆) = N(βib , βiw |B̆, Σ̆)
1(βib , βiw )
R(B̆, Σ̆)
where
Z
1
Z
R(B̆, Σ̆) =
0
Gary King ()
1
N(β b , β w |B̆, Σ̆)dβ b dβ w
(volume above unit square)
0
Ecological Inference
21 / 38
Deriving the Likelihood Function
Gary King ()
Ecological Inference
22 / 38
Deriving the Likelihood Function
4. (From simulations of these parameters, we will compute quantities of interest:
βib , βiw . Details shortly.)
Gary King ()
Ecological Inference
22 / 38
Deriving the Likelihood Function
4. (From simulations of these parameters, we will compute quantities of interest:
βib , βiw . Details shortly.)
5. The likelihood:
Gary King ()
Ecological Inference
22 / 38
Deriving the Likelihood Function
4. (From simulations of these parameters, we will compute quantities of interest:
βib , βiw . Details shortly.)
5. The likelihood:
L(ψ̆|T ) ∝
Y
P(Ti |ψ̆)
Xi ∈(0,1)
Gary King ()
Ecological Inference
22 / 38
Deriving the Likelihood Function
4. (From simulations of these parameters, we will compute quantities of interest:
βib , βiw . Details shortly.)
5. The likelihood:
L(ψ̆|T ) ∝
Y
P(Ti |ψ̆)
Xi ∈(0,1)
=
Y Xi ∈(0,1)
Gary King ()
What we observe
What we could have observed
Ecological Inference
22 / 38
Deriving the Likelihood Function
4. (From simulations of these parameters, we will compute quantities of interest:
βib , βiw . Details shortly.)
5. The likelihood:
L(ψ̆|T ) ∝
Y
P(Ti |ψ̆)
Xi ∈(0,1)
Y What we observe
What we could have observed
Xi ∈(0,1)
Y
Area above line segment
=
Volume above square
=
Xi ∈(0,1)
Gary King ()
Ecological Inference
22 / 38
Deriving the Likelihood Function
4. (From simulations of these parameters, we will compute quantities of interest:
βib , βiw . Details shortly.)
5. The likelihood:
L(ψ̆|T ) ∝
Y
P(Ti |ψ̆)
Xi ∈(0,1)
What we observe
What we could have observed
Xi ∈(0,1)
Y
Area above line segment
=
Volume above square
Xi ∈(0,1)
Area above line segment
Y Area above line Area above line
=
Volume above square
Volume above plane
=
Y Xi ∈(0,1)
Gary King ()
Volume above plane
Ecological Inference
22 / 38
Deriving the Likelihood Function
4. (From simulations of these parameters, we will compute quantities of interest:
βib , βiw . Details shortly.)
5. The likelihood:
L(ψ̆|T ) ∝
Y
P(Ti |ψ̆)
Xi ∈(0,1)
What we observe
What we could have observed
Xi ∈(0,1)
Y
Area above line segment
=
Volume above square
Xi ∈(0,1)
Area above line segment
Y Area above line Area above line
=
Volume above square
Volume above plane
=
Y Xi ∈(0,1)
=
Y
Xi ∈(0,1)
Gary King ()
Volume above plane
N(Ti |µi , σi2 )
S(B̆, Σ̆)
R(B̆, Σ̆)
Ecological Inference
22 / 38
Deriving the Likelihood Function
Gary King ()
Ecological Inference
23 / 38
Deriving the Likelihood Function
where
Gary King ()
Ecological Inference
23 / 38
Deriving the Likelihood Function
where
E (Ti |Xi ) ≡ µi = B̆b Xi + B̆w (1 − Xi ),
Gary King ()
Ecological Inference
23 / 38
Deriving the Likelihood Function
where
E (Ti |Xi ) ≡ µi = B̆b Xi + B̆w (1 − Xi ),
V (Ti |Xi ) ≡ σi2 = (σ̆w2 ) + (2σ̆bw − 2σ̆w2 )Xi + (σ̆b2 + σ̆w2 − 2σ̆bw )Xi2 ,
Gary King ()
Ecological Inference
23 / 38
Deriving the Likelihood Function
where
E (Ti |Xi ) ≡ µi = B̆b Xi + B̆w (1 − Xi ),
V (Ti |Xi ) ≡ σi2 = (σ̆w2 ) + (2σ̆bw − 2σ̆w2 )Xi + (σ̆b2 + σ̆w2 − 2σ̆bw )Xi2 ,
“
”
T
min 1, Xi
ω2
ωi
S(B̆, Σ̆) =
i , σ̆b2 − i2
“
” N β B̆ +
T −(1−Xi )
σi
σi
max 0,
X
Z
i
b
b
dβ b
i
Gary King ()
Ecological Inference
23 / 38
Deriving the Likelihood Function
6. A visual version of the likelihood:
1
.75
w
β i .5
.25
0
0
.25
.5
.75
1
b
βi
Gary King ()
Ecological Inference
24 / 38
The Truncated Bivariate Normal Distribution’s Five Parameters Can be Estimated
From Aggregate Data: Intuition
(a)
0.5
0.5
0.2
0.2
-0.95
(b)
1
•
•
••
•
••
•
•
••
•
• •
•
•
••
•
• • •
• ••
•
• •• ••
•
•
• • • •
•
•
•
• •• • ••
•
•• • •• • •••
•
•
• • • • ••
• ••••••
••
•
• • • •••• •••• ••
• •
•
• • ••
• •• • •••• ••
• • •• • •
•
•• • •
•
••• •
• ••
•
•• • • •
•
• ••
•
• •• • •
• • •
•
••
• ••
•
••
••
• •
•
•
•
• •
•
•
••
• •
• • ••
•
• •
•
•
•
••
• •
•• •
• •
•
•
•
•
•
•
•
•
.5
•
0.2
•
••
•
•
•
.25
Ti
.5
.25
.5
.75
1
0
.25
.5
Xi
(c)
0.7
0.3
0.2
-0.64
(d)
1
•
•
•• •
•
• •
•
• •••
•
••
•
•
• ••• •
• •
•
•
• •• • •
•
•• •
•
•
• •
•
•
•• • • ••• • •• •
•
• • • •• • •
• ••
• • • •• • ••• •• • • •
• •
•••
•• • • • • • •
•
•
•
•
• •
•
•
•
•
•
• •• •
•
•
•••
• ••
•
••••
••
•
•
•
•
•••
•
•• ••• •
• ••
•
•
••
•
•
••
•
• •
• ••
•
•
•
•
•• • •
•
•
•
•
•
•
• ••
• •
• ••• •
•
•
•
•
•
•
• •
•
• •• •
•
•
•
•
• •
• •
•
•
Ti
.5
•
•
••
•
•
•
•
•
•
• • ••
•
•
•
•
•
• •
0
.25
0.4
.5
0.8
0.3
.75
•
•
.5
•
•
• • •••
•
•
• ••
•
•
•
•••
•
1
0
.25
.5
-0.48
(f)
1
•
•
•
•
•
•
••
• •
•
• •
•
••
•
• •• • • •
•
•
•
•
•
• •• • • • • •• •
• •
•
•
• • •
•
•
•
• ••
•
•
• • •• • • •
••
•
•• • • ••
•
•
•
• •
••
• •••• • •••
•
•
•
•
•• •
•
• • • • •
• • •
••
•
•• •
• •
• •
•
•
• •
• •
•
•
•
•
•
•
•
• • •
• •• •
• •
• •
• •
••
• •
•
••
• ••
••
•
•
•• • • • ••
• •
•
• • •
• •
•
•
•
•
•
•
•
• •
•
•
•
•• • • •
•
•
•
•
•
••
•• •• •
•
•
•
•
0
.25
.5
.75
1
0.2
0.7
0.2
0.2
1
0.57
• •
•
•
•
•
• • •
••
• •
• • • •
•
•
••• •
• • •• •
•
•
•
••
•
•
•
•
•
•
• •
•
•
•
• •
•
•
•
• •
•
•• • •
•
• •
•
••
•• •
• •
•
•
• •
•
• ••
•
•
•
•
•
••
• •
• •
••• • • •
•
•
•
•
•
•
•
•
• •
••
••
•
•
•
•
•
•
•
•
• •
••
•
•
• • • • • •• • • • •
• •
•
•
• •
••
•
•
••
•
•
•
• ••••• •
•
•
••
• •
•
•
•
• •• •• •
•
•
•
••
••• •
•
• • •
•
• •
••
••
• ••
•
••
• ••
.75
•• •
Ti
.5
.25
0
0
.75
Xi
0.1
•
.25
•
•
Xi
(e)
Ti
1
0.4
•
0
0
1
.75
0.3
•
•
••
•
••
•
.25
0.1
•
•
• • •
•
• •
• ••
•
•
•
•• ••
•• •
• • • • •• ••• ••
•
• • • • ••• •
•
•
•••••
••
•
•
• • • •
•••
•
•
• •
•
• • •
• • • • •
• •• ••
••
••
•• •
•
•
•
• • •
• •
• ••
•
• •• •
•••
• •
•
••
•
•
••
•
•
•
••
• ••
• ••
•
••
•
•
••
•
•
•
• •
0.5
•
•
•
.75
•
•
0.8
•
•
•
•
•
.75
Xi
0.2
•
• •
.5
••
••
0
0
.25
0.95
•
•
•••
1
Ti
•
• ••
•
• •
•
0
.75
0.2
•
•
•
•
•
.75
•
••
.25
0.5
•
•
•
•
•
•• •
•
• •
•
•
• •
• •
••
• • • •
•
•
•
•
• • •
•
• •
•
•• •
•
•
•
•
•
•
•
•• •
•
•
•
•• •
• • •
••
•
••
•••• •• • •
•
•
•
•
• •
••• •
•
•
• • • • •• •
• • •
• •
•••
•
••
••
•• •
• •
• ••
•
•
•
•
•
•
•
• • • •
• • •• •
•
• •
•
•
•
••
• • •
•
• •
•
• • •
•
•
•
•
•
••
•
•
•
• •
• • •
•
•
•
•
•
•
• •
• •
••
•
• •
•
Ti
0.5
1
•
.75
0
Xi
.25
.5
.75
1
Xi
Data were randomly generated from the model with parameter values B̆b , B̆w , σb , σw ,
and ρ, at the top of each graph. The solid line is the expected value and dashed lines are
at plus and minus one standard deviation.
Gary King ()
Ecological Inference
25 / 38
Another view of how the data change with the model
(a)
0.5
0.7
0.2
0.2
-0.8
(d)
1
βwi
0.1
0.2
0.3
-0.8
•
.75
βwi
.5
.25
.5
.25
0
•
0
0
.25
.5
.75
1
0
.25
βbi
(b)
0.5
0.7
0.2
.5
.75
0
(e)
0.9
0.9
0.1
0.3
1
•
.75
1
βbi
0.2
1
0
•
.75
βwi .5
βwi .5
.25
.25
0
0
0
.25
.5
.75
1
0
.25
βbi
(c)
0.5
0.7
0.2
.5
.75
1
βbi
0.2
0.8
(f)
1
-0.05
-0.05
0.2
0.3
0.8
1
•
.75
βwi
0.1
1
.75
.75
βwi
.5
.25
.5
.25
•
Observable Implications for Sample Parameter Values. The numbers at the top
of each tomography plot are the parameter values for the distribution from which
data were randomly generated: B̆b , B̆w , σ̆b , σ̆w , and ρ̆.
0
0
0
.25
.5
.75
1
0
βbi
Gary King ()
.25
.5
.75
1
βbi
Ecological Inference
26 / 38
Calculating Quantities of Interest: A story of X-Rays and
tomography machines; then how to do it
Rearranging the basic accounting identity gives βiw as a linear function of
βib :
Gary King ()
Ecological Inference
27 / 38
Calculating Quantities of Interest: A story of X-Rays and
tomography machines; then how to do it
Rearranging the basic accounting identity gives βiw as a linear function of
βib :
Ti
Xi
βiw =
−
βib
1 − Xi
1 − Xi
Gary King ()
Ecological Inference
27 / 38
Calculating Quantities of Interest: A story of X-Rays and
tomography machines; then how to do it
Rearranging the basic accounting identity gives βiw as a linear function of
βib :
Ti
Xi
βiw =
−
βib
1 − Xi
1 − Xi
Thus, knowing Ti and Xi in one precinct narrows the possible values of
βib , βiw to one line cut across this figure:
Gary King ()
Ecological Inference
27 / 38
Calculating Quantities of Interest: A story of X-Rays and
tomography machines; then how to do it
Rearranging the basic accounting identity gives βiw as a linear function of
βib :
Ti
Xi
βiw =
−
βib
1 − Xi
1 − Xi
Thus, knowing Ti and Xi in one precinct narrows the possible values of
βib , βiw to one line cut across this figure:
1
.75
w
β i .5
A Tomography Plot
.25
0
0
.25
.5
.75
1
b
βi
Gary King ()
Ecological Inference
27 / 38
Calculating Quantities of Interest: A story of X-Rays and
tomography machines; then how to do it
P 48
25
20
15
10
5
0
P 115
25
20
15
10
5
0
P 195
25
20
15
10
5
0
P 238
25
20
15
10
5
0
0
Gary King ()
.2
.4
βi
b
Ecological Inference
.6
.8
1
28 / 38
How to Calculate Quantities of Interest
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
1. Option 1. Simulate only (district level) aggregate quantities
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
1. Option 1. Simulate only (district level) aggregate quantities
(a) Algorithm to take one draw of the district-level fraction of blacks who
vote:
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
1. Option 1. Simulate only (district level) aggregate quantities
(a) Algorithm to take one draw of the district-level fraction of blacks who
vote:
i. Draw ψ̆ from its posterior or sampling density: an asymptotic normal with
mean equal to point estimates and variance the inverse of the -Hessian at
the maximum.
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
1. Option 1. Simulate only (district level) aggregate quantities
(a) Algorithm to take one draw of the district-level fraction of blacks who
vote:
i. Draw ψ̆ from its posterior or sampling density: an asymptotic normal with
mean equal to point estimates and variance the inverse of the -Hessian at
the maximum.
ii. Draw βib and βiw from TN(βib , βiw |B̆, Σ̆), given the simulated parameters,
ψ̆ = {B̆, Σ̆}.
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
1. Option 1. Simulate only (district level) aggregate quantities
(a) Algorithm to take one draw of the district-level fraction of blacks who
vote:
i. Draw ψ̆ from its posterior or sampling density: an asymptotic normal with
mean equal to point estimates and variance the inverse of the -Hessian at
the maximum.
ii. Draw βib and βiw from TN(βib , βiw |B̆, Σ̆), given the simulated parameters,
ψ̆ = {B̆, Σ̆}.
iii. Compute the weighted average of the simulated coefficients (weights based
on precinct population):
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
1. Option 1. Simulate only (district level) aggregate quantities
(a) Algorithm to take one draw of the district-level fraction of blacks who
vote:
i. Draw ψ̆ from its posterior or sampling density: an asymptotic normal with
mean equal to point estimates and variance the inverse of the -Hessian at
the maximum.
ii. Draw βib and βiw from TN(βib , βiw |B̆, Σ̆), given the simulated parameters,
ψ̆ = {B̆, Σ̆}.
iii. Compute the weighted average of the simulated coefficients (weights based
on precinct population):
p
X
Nib+ β̃ib
B̃ b =
N+b+
i=1
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
1. Option 1. Simulate only (district level) aggregate quantities
(a) Algorithm to take one draw of the district-level fraction of blacks who
vote:
i. Draw ψ̆ from its posterior or sampling density: an asymptotic normal with
mean equal to point estimates and variance the inverse of the -Hessian at
the maximum.
ii. Draw βib and βiw from TN(βib , βiw |B̆, Σ̆), given the simulated parameters,
ψ̆ = {B̆, Σ̆}.
iii. Compute the weighted average of the simulated coefficients (weights based
on precinct population):
p
X
Nib+ β̃ib
B̃ b =
N+b+
i=1
(b) Problem: We only get knowledge of the district-wide aggregate & its not
robust.
Gary King ()
Ecological Inference
29 / 38
How to Calculate Quantities of Interest
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
(c) We could apply the Option 1 algorithm and use rejection sampling
(discard simulations of βib , βiw that are not on the tomography line), but
this would take forever.
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
(c) We could apply the Option 1 algorithm and use rejection sampling
(discard simulations of βib , βiw that are not on the tomography line), but
this would take forever.
(d) Alternative algorithm for drawing simulations of βib and βiw .
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
(c) We could apply the Option 1 algorithm and use rejection sampling
(discard simulations of βib , βiw that are not on the tomography line), but
this would take forever.
(d) Alternative algorithm for drawing simulations of βib and βiw .
i. Find the expression for P(βib |Ti , ψ̆) analytically, which is a particular
truncated univariate normal (see King, 1997: Appendix C).
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
(c) We could apply the Option 1 algorithm and use rejection sampling
(discard simulations of βib , βiw that are not on the tomography line), but
this would take forever.
(d) Alternative algorithm for drawing simulations of βib and βiw .
i. Find the expression for P(βib |Ti , ψ̆) analytically, which is a particular
truncated univariate normal (see King, 1997: Appendix C).
ii. Draw ψ̆ from its posterior or sampling density (the same multivariate
normal as always).
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
(c) We could apply the Option 1 algorithm and use rejection sampling
(discard simulations of βib , βiw that are not on the tomography line), but
this would take forever.
(d) Alternative algorithm for drawing simulations of βib and βiw .
i. Find the expression for P(βib |Ti , ψ̆) analytically, which is a particular
truncated univariate normal (see King, 1997: Appendix C).
ii. Draw ψ̆ from its posterior or sampling density (the same multivariate
normal as always).
iii. Insert the simulation into P(βib |Ti , ψ̆) and draw out one simulated βib .
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
(c) We could apply the Option 1 algorithm and use rejection sampling
(discard simulations of βib , βiw that are not on the tomography line), but
this would take forever.
(d) Alternative algorithm for drawing simulations of βib and βiw .
i. Find the expression for P(βib |Ti , ψ̆) analytically, which is a particular
truncated univariate normal (see King, 1997: Appendix C).
ii. Draw ψ̆ from its posterior or sampling density (the same multivariate
normal as always).
iii. Insert the simulation into P(βib |Ti , ψ̆) and draw out one simulated βib .
iv. Compute βiw , if desired, deterministically from reformulated accounting
identity:
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
2. Option 2. use the knowledge that simulations for observation i must
come from its tomography line:
(a) By the story of the model, if we know Ti , we learn the entire tomography
line (since Xi is known ex ante).
(b) So we will condition on Ti to make a prediction from the tomography line.
(c) We could apply the Option 1 algorithm and use rejection sampling
(discard simulations of βib , βiw that are not on the tomography line), but
this would take forever.
(d) Alternative algorithm for drawing simulations of βib and βiw .
i. Find the expression for P(βib |Ti , ψ̆) analytically, which is a particular
truncated univariate normal (see King, 1997: Appendix C).
ii. Draw ψ̆ from its posterior or sampling density (the same multivariate
normal as always).
iii. Insert the simulation into P(βib |Ti , ψ̆) and draw out one simulated βib .
iv. Compute βiw , if desired, deterministically from reformulated accounting
identity:
« „
«
„
Xi
Ti
β̃iw =
−
β̃ib
1 − Xi
1 − Xi
Gary King ()
Ecological Inference
30 / 38
How to Calculate Quantities of Interest
Gary King ()
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
Gary King ()
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
φ1 =
Gary King ()
B̆b − 0.5
σ̆b2 + 0.25
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
Gary King ()
φ1 =
B̆b − 0.5
σ̆b2 + 0.25
φ2 =
B̆w − 0.5
σ̆w2 + 0.25
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
φ1 =
B̆b − 0.5
σ̆b2 + 0.25
φ2 =
B̆w − 0.5
σ̆w2 + 0.25
both of which reduce correlations, and
Gary King ()
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
φ1 =
B̆b − 0.5
σ̆b2 + 0.25
φ2 =
B̆w − 0.5
σ̆w2 + 0.25
both of which reduce correlations, and
φ3 = ln(σ̆b )
Gary King ()
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
φ1 =
B̆b − 0.5
σ̆b2 + 0.25
φ2 =
B̆w − 0.5
σ̆w2 + 0.25
both of which reduce correlations, and
φ3 = ln(σ̆b )
φ4 = ln(σ̆w )
Gary King ()
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
φ1 =
B̆b − 0.5
σ̆b2 + 0.25
φ2 =
B̆w − 0.5
σ̆w2 + 0.25
both of which reduce correlations, and
φ3 = ln(σ̆b )
φ4 = ln(σ̆w )
1 + ρ̆
φ5 = 0.5 ln
1 − ρ̆
Gary King ()
Ecological Inference
31 / 38
How to Calculate Quantities of Interest
3. Option 2 will be improved via reparameterization.
φ1 =
B̆b − 0.5
σ̆b2 + 0.25
φ2 =
B̆w − 0.5
σ̆w2 + 0.25
both of which reduce correlations, and
φ3 = ln(σ̆b )
φ4 = ln(σ̆w )
1 + ρ̆
φ5 = 0.5 ln
1 − ρ̆
4. Option 2 will also be improved by fixing the draws with importance
resampling (just as we did with Amelia, Lecture Notes 4)
Gary King ()
Ecological Inference
31 / 38
Advantages and Risks of Goodman
Assumptions correct?
Estimates accurate?
Gary King ()
Ecological Inference
(1)
Yes
Yes
(2)
No
No
32 / 38
Advantages and Risks of Goodman
Assumptions correct?
Estimates accurate?
(1)
Yes
Yes
(2)
No
No
Advantages and Risks of EI
Gary King ()
Ecological Inference
32 / 38
Advantages and Risks of Goodman
(1)
Yes
Yes
Assumptions correct?
Estimates accurate?
(2)
No
No
Advantages and Risks of EI
Assumptions correct?
Bounds Informative?
Diagnostics Informative?
Qualitative Info. Useful?
Estimates accurate?
Gary King ()
(1)
Yes
(2)
No
Yes
(3)
No
No
Yes
Yes
Yes
Yes
Ecological Inference
(4)
No
No
No
Yes
Yes
(5)
No
No
No
No
No∗
32 / 38
Advantages and Risks of Goodman
(1)
Yes
Yes
Assumptions correct?
Estimates accurate?
(2)
No
No
Advantages and Risks of EI
Assumptions correct?
Bounds Informative?
Diagnostics Informative?
Qualitative Info. Useful?
Estimates accurate?
(1)
Yes
(2)
No
Yes
(3)
No
No
Yes
Yes
Yes
Yes
(4)
No
No
No
Yes
Yes
(5)
No
No
No
No
No∗
∗ Even
in this case, EI is more robust than Goodman, and the maximum
risks are knowable ex ante.
Gary King ()
Ecological Inference
32 / 38
(A) Tomography, No Bias
1
.75
w
β i .5
.25
•
•
•
• •• • • ••• ••
••• • •• • • •• •• ••••
•
•
•
•
• •• ••• • ••• •• •• • • •
•
• •••• • ••
•
••• • •
0
β i .5
.25
.25
.5
b
βi
.75
T i .5
.25
1
(C) Tomography, Bias
1
.75
.75
0
0
w
(B) Scatter Plot, No Bias
1
0
0
.5
Xi
.75
1
(D) Scatter Plot, Bias
1
•
•
•
• •• • • ••• ••
••• • •• • • •• •• ••••
•
•
•
•
• •••• • • • ••• •• •• • • •
•
• •••• • ••
•
••• • •
.25
.75
T i .5
.25
0
0
.25
.5
b
βi
.75
1
0
.25
.5
Xi
.75
1
Figure:
The Worst of Aggregation Bias: Same Truth, Different Observable Implications. Graphs (A) and (B) represent data
randomly generated from the model with parameters B̆b = B̆w = 0.5, σ̆b = 0.4, σ̆w = 0.1, and ρ̆ = 0.2. Graphs (C) and
(D) represent data with the same values of βib and βiw but different aggregate data, created to maximize the degree of
aggregation bias while still leaving the generating distribution unchanged. Graphs (A) and (C) are tomography plots with true
coordinates appearing as black dots, and with contour ellipses estimated from aggregate data only. Graphs (B) and (D) are
scatter plots of Xi by Ti with lines representing the true precinct parameters.
Gary King ()
Ecological Inference
33 / 38
(A) Tomography, No Bias
1
.75
.75
••• ••
• ••
• •••••••••••••••••••••••••
• •••••••• •• •
• •
w
β i .5
.25
T i .5
.25
0
0
0
1
.75
w
β i .5
(B) Scatter Plot, No Bias
1
.25
.5
b
βi
.75
1
(C) Tomography, Bias
•••• • ••• • •
•• • • • ••••• •
••
••••••
••
•
•
0
0
.25
.5
b
βi
.25
.5
Xi
.75
1
(D) Scatter Plot, Bias
1
.75
• ••
••••••
••••••
•
•• •• • • ••••
• • ••••
.25
0
.75
1
T i .5
.25
0
0
.25
.5
Xi
.75
1
Figure:
The Worst of Distributional Violations: Different True Parameters, Same Observable Implications. Graphs (A) and
(B) represent data randomly generated from the model with parameters B̆b = B̆w = 0.5, σ̆b = σ̆w = 0.1, and ρ̆ = 0.
Graphs (C) and (D) represent data with the same values of Xi and Ti but different values of βib and βiw , created to minimize
the fit of the truncated bivariate normal distribution while not introducing aggregation bias. Graphs (A) and (C) are tomography
plots with true coordinates appearing as black dots, and with contour ellipses estimated from aggregate data only. Graphs (B)
and (D) are scatter plots of Xi by Ti with lines representing the true precinct parameters.
Gary King ()
Ecological Inference
34 / 38
Diagnostics
Gary King ()
Ecological Inference
35 / 38
Diagnostics
1
.75
w
βi
.5
.25
0
0
.25
.5
b
βi
.75
1
Evidence of Multiple Modes (King, 1997: Figure 9.7)
Gary King ()
Ecological Inference
35 / 38
Diagnostics
1
.75
w
βi
.5
.25
0
0
.25
.5
b
βi
.75
1
Evidence of Multiple Modes (King, 1997: Figure 9.7)
1
.75
w
βi
.5
.25
0
0
.25
.5
b
βi
.75
1
Evidence of Aggregation Bias (King, 1997: Figure 9.3)
Gary King ()
Ecological Inference
35 / 38
Diagnostics
•
1
1
•
.5
.25
.75
w
• • •
• • •••••••••
•• •• ••••••••••••••••••••••••••••••• •
•••••••••••••••
• • •• •••••••••••••••••••••
••
• •••••••••••••••••••••••••••••••••••
•
• • ••••••• •••
•• •• ••••• ••••• •
•
•• • •
• • •• •
••
•
••
True β i
True βi
b
.75
.5
•
•
0
.25
0
0
.25
.5
.75
1
Xi
0
•••
• ••• •••••••••••••••••••••
•••••••
••••• •••••••••••••••••••••••••••••••••••••••••
•• • • ••• • •
• •• ••••••••••••••••••••••••••••
.25
.5
.75
1
Xi
Evidence of aggregation bias in real data: an alternative display (King:
1997: Figure 13.2)
Gary King ()
Ecological Inference
36 / 38
Model Extensions
Gary King ()
Ecological Inference
37 / 38
Model Extensions
1. Adding a systematic component for the means, with covariates Zi :
Gary King ()
Ecological Inference
37 / 38
Model Extensions
1. Adding a systematic component for the means, with covariates Zi :
h
i
B̆bi = φ1 (σ̆b2 + 0.25) + 0.5 + (Zib − Z̄ b )αb
Gary King ()
Ecological Inference
37 / 38
Model Extensions
1. Adding a systematic component for the means, with covariates Zi :
h
i
B̆bi = φ1 (σ̆b2 + 0.25) + 0.5 + (Zib − Z̄ b )αb
h
i
B̆wi = φ2 (σ̆w2 + 0.25) + 0.5 + (Ziw − Z̄ w )αw
Gary King ()
Ecological Inference
37 / 38
Model Extensions
1. Adding a systematic component for the means, with covariates Zi :
h
i
B̆bi = φ1 (σ̆b2 + 0.25) + 0.5 + (Zib − Z̄ b )αb
h
i
B̆wi = φ2 (σ̆w2 + 0.25) + 0.5 + (Ziw − Z̄ w )αw
This bracketed term unwinds the reparameterization.
Gary King ()
Ecological Inference
37 / 38
Model Extensions
1. Adding a systematic component for the means, with covariates Zi :
h
i
B̆bi = φ1 (σ̆b2 + 0.25) + 0.5 + (Zib − Z̄ b )αb
h
i
B̆wi = φ2 (σ̆w2 + 0.25) + 0.5 + (Ziw − Z̄ w )αw
This bracketed term unwinds the reparameterization.
2. Allowing Zi = Xi works if bounds are informative (recall that it was not identified
under Goodman’s unbounded approach)
Gary King ()
Ecological Inference
37 / 38
Model Extensions
1. Adding a systematic component for the means, with covariates Zi :
h
i
B̆bi = φ1 (σ̆b2 + 0.25) + 0.5 + (Zib − Z̄ b )αb
h
i
B̆wi = φ2 (σ̆w2 + 0.25) + 0.5 + (Ziw − Z̄ w )αw
This bracketed term unwinds the reparameterization.
2. Allowing Zi = Xi works if bounds are informative (recall that it was not identified
under Goodman’s unbounded approach)
.15
τ= 0
Mean Absolute Error
τ= 0.1
τ= 0.2
.1
τ= 0.5
τ= ∞
τ= 1
τ= ∞
.05
.025
τ= 0
0 •
0
.25
.5
.75
1
1.25
α
Gary King ()
Ecological Inference
37 / 38
Model Extensions
1. Adding a systematic component for the means, with covariates Zi :
h
i
B̆bi = φ1 (σ̆b2 + 0.25) + 0.5 + (Zib − Z̄ b )αb
h
i
B̆wi = φ2 (σ̆w2 + 0.25) + 0.5 + (Ziw − Z̄ w )αw
This bracketed term unwinds the reparameterization.
2. Allowing Zi = Xi works if bounds are informative (recall that it was not identified
under Goodman’s unbounded approach)
.15
τ= 0
Mean Absolute Error
τ= 0.1
τ= 0.2
.1
τ= 0.5
τ= ∞
τ= 1
τ= ∞
.05
.025
τ= 0
0 •
0
.25
.5
.75
1
1.25
α
1. Figure (from King, 1997: Figure 9.6) is mean absolute error of district-level
quantities (averaged over 90 Monte Carlo simulations for each point) by the degree
of aggregation bias (α = αb = αw set at points on the horizontal axis) for models
with prior N(α|0, τ ).
Gary King ()
Ecological Inference
37 / 38
Model Extensions
Gary King ()
Ecological Inference
38 / 38
Model Extensions
2. In the case with τ = 0 (i.e., no covariate), MAE increases with α, but
maxes out — which is the robustness due to the bounds kicking in.
Gary King ()
Ecological Inference
38 / 38
Model Extensions
2. In the case with τ = 0 (i.e., no covariate), MAE increases with α, but
maxes out — which is the robustness due to the bounds kicking in.
3. Goodman’s regression, if plotted, would be a straight line increasing
without bound.
Gary King ()
Ecological Inference
38 / 38
Model Extensions
2. In the case with τ = 0 (i.e., no covariate), MAE increases with α, but
maxes out — which is the robustness due to the bounds kicking in.
3. Goodman’s regression, if plotted, would be a straight line increasing
without bound.
4. In the τ = ∞ (covariate included, no prior) case, MAE doesn’t change
with α. Its higher than τ = 0 case with small α and larger with higher
α.
Gary King ()
Ecological Inference
38 / 38
Model Extensions
2. In the case with τ = 0 (i.e., no covariate), MAE increases with α, but
maxes out — which is the robustness due to the bounds kicking in.
3. Goodman’s regression, if plotted, would be a straight line increasing
without bound.
4. In the τ = ∞ (covariate included, no prior) case, MAE doesn’t change
with α. Its higher than τ = 0 case with small α and larger with higher
α.
5. As usual with Bayesian analysis, the intermediate cases seem optimal.
E.g., τ = 0.5 sacrifices trivially compared to the τ = 0 case when α is
small for a big gain when α is large.
Gary King ()
Ecological Inference
38 / 38