Bias magnification in ecologic studies: a methodological investigation
 Thomas F Webster^{1}Email author
DOI: 10.1186/1476069X617
© Webster; licensee BioMed Central Ltd. 2007
Received: 05 July 2006
Accepted: 05 July 2007
Published: 05 July 2007
Abstract
Background
As ecologic studies are often inexpensive to conduct, consideration of the magnitude and direction of ecologic biases may be useful in both study design and sensitivity analysis of results. This paper examines three types of ecologic bias: confounding by group, effect measure modification by group, and nondifferential exposure misclassification.
Methods
Bias of the risk difference on the individual and ecologic levels are compared using twobytwo tables, simple equations, and risk diagrams. Risk diagrams provide a convenient way to simultaneously display information from both levels.
Results
Confounding by group and effect measure modification by group act in the same direction on the individual and group levels, but have larger impact on the latter. The reduction in exposure variance caused by aggregation magnifies the individual level bias due to ignoring groups. For some studies, the magnification factor can be calculated from the ecologic data alone. Small magnification factors indicate little bias beyond that occurring at the individual level. Aggregation is also responsible for the different impacts of nondifferential exposure misclassification on individual and ecologic studies.
Conclusion
The analytical tools developed here are useful in analyzing ecologic bias. The concept of bias magnification may be helpful in designing ecologic studies and performing sensitivity analysis of their results.
Background
Epidemiology is the study of health and disease in populations, but the standard for an observational study remains the individual level design, where we have information about outcome, exposure and covariates for each study subject [1]. This remains an ideal, although some designs mix grouplevel and individuallevel variables in ways meant to enhance validity [2–5]. In practice, in the absence of better information, we often substitute an aggregate (group summary) value of some variable for each study subject. The extreme case is when aggregate values of exposure and outcome are used for every study variable. This is often called an ecologic study.
Resort to ecologic designs usually stems from the practical consideration that summary information is more easily obtained and more often available than individuallevel data. Sometimes summary data are all that are available, and then, only in its crudest form, for example, that a certain percentage of a group of subjects is exposed (a group summary of an exposure variable) and a certain percentage of the same group has a specific health outcome (a group summary of an outcome variable). In this case we have lost information about whether those with the outcome are the same as those who are exposed. Despite this information loss, it is tempting and plausible to say that we still have some useful information on risks of exposure.
Epidemiologists know that using ecologic designs (group level variables only) to make inferences about individual risks (individual level variables) can be seriously biased [e.g., [6, 7]], but exactly how and when this bias occurs is often mysterious. In discussions of individuallevel studies it is not enough to say a result might be confounded; one should consider the amount and direction of confounding. Given the potential value that ecologic studies have for obtaining information not otherwise readily available, it would seem useful to approach these studies in the same way, i.e., not dismiss them at the outset but instead try to describe the magnitude and direction of potential biases.
Here I apply this idea to ecologic studies, using individuallevel studies as a reference. In particular, I will discuss the direction and extent of bias in ecologic studies compared with studies of individuals. This paper is meant to reveal underlying mechanisms with a simple model so practicing epidemiologists can begin to visualize what is happening when aggregate data are used. Among the many types of bias possible in ecologic studies [7], I will examine three of the most important: confounding by group, effect measure modification by group, and nondifferential exposure misclassification.
Methods
Use of twobytwo tables
Theoretical problems are often best approached by starting simply and adding complications later. I focus here on closed cohorts with binary exposures and outcomes, using the risk difference as an effect measure. This approach allows us to see the ecologic inference problem at work using simple tools.
Individual vs. ecologic data
Individual (interior cells)  Ecologic (margins)  

exposed  unexposed  sum  exposed  unexposed  sum  
cases  16  12  28  ?  ?  28 
noncases  24  48  72  ?  ?  72 
total  40  60  100  40  60  100 
risks  0.4  0.2  X  0.40  
RD  0.2  Y  0.28  
n  100 
The ecologic data are also visible on the margins of the table [8]. They provide the average exposure and average risk for the whole group but not the exposed and unexposed subjects within the group.
Risk diagrams and equations
For binary exposures, individuallevel data only occur at exposures of zero and one, but it is convenient to think in terms of a continuous exposure. The simplest relationship would be a linear equation:
r _{ j }= q + bx _{ j }
where r _{ j }is the risk as a function of exposure x and j is an index for subjects. The intercept q is the risk in the unexposed, also called the background risk. The slope b is the risk difference. We call these equations (linear) risk functions. They describe risk as a function of exposure on the individual level.
The expected value of the binary outcome for individual y _{ j }, considered as a probability, is equal to the person's risk, so that
y _{ j }= q + bx _{ j }+ e _{ j }
where e _{ j }is an error term. One can also think of the risks as proportions and the e _{ j }as residuals (see appendix 1 for additional discussion of the model). Ordinary least squares regression of the individuallevel data (x _{ j }, y _{ j }) in a twobytwo table can then be used to obtain the intercept q and risk difference b. We will see it is a useful tool for estimating ecologic bias. As discussed in appendix 2, this approach can be readily extended to rates, continuous outcomes (e.g., birth weights) and continuous exposures.
Since ecologic analyses only give us a single black dot for each twobytwo table, a collection of twobytwo tables is typically used. The idea is to extract information by examining how the outcome marginals vary as the exposure marginals change (e.g., how cancer rates change as the proportion of the population exposed to contaminated water changes across cities). This means we will usually be concerned with multiple tables, with each table describing a different group. We index the groups by the letter i:
y _{ ij }= q _{ i }+ b _{ i } x _{ ij }+ e _{ ij }
Since the background risk and risk difference may vary between groups, we must also add the index i to q and b.
Equations 1–3 describe individuallevel models. In this paper, we will treat such models as a fixed reference for comparison with the results of ecologic inference. The fact that the q _{ i }and b _{ i }may differ between groups will prove critically important.
Linearity and aggregation
If the risk function is linear, as in Figure 1, then the dot describing the ecologic data must lie on the line describing the individuallevel information. For binary exposures, this occurs because the dot represents a weighted average of the exposed and unexposed. More generally, this fact is a consequence of the aggregation theorem [7]. Mathematically, this means that if the risk function is linear, the grouplevel equations produced by aggregating individuallevel equations will have the same form and the same parameters (appendix 1). For example, averaging equation 3 within each group yields
Y _{ i }= q _{ i }+ b _{ i } X _{ i }
where X _{ i }and Y _{ i }are, respectively, the average exposure and average risk in group i (the aggregate error or residual term can typically be ignored). Following Susser [12], capital letters X and Y refer to grouplevel variables, lowercase x and y refer to individuallevel variables.
We continue our exposition using linear risk functions, showing how confounding and effect modification between groups and exposure misclassification increase bias when variables are aggregated.
Loss of information and ecologic inference
A single dot is insufficient to determine a line. What if there were two or more dots, i.e., several twobytwo tables? Could we then recover the individual level information? The answer is "Yes," but only by making some very strong assumptions. If the assumptions are violated, large biases can occur.
Results
Epidemiologists often use regression of data from a number of groups for ecologic inference, regressing the average risk Y _{ i }in each group against the average exposure X _{ i }in each group. This approach is sometimes called ecologic or Goodman regression [10, 13] (For a more formal treatment of ecologic regression and other methods, as well as ecologic bias, see [14]). We will use weighted least squares, weighting each group by its population n _{ i }. Unweighted regression of ecologic data can cause an additional source of bias relative to individuallevel analysis (appendix 3).
Ecologic regression can produce unbiased results. One way is to assume the individuallevel model has the same background risk (intercept q) and risk difference (slope b) in every group:
y _{ ij }= q + bx _{ ij }+ e _{ ij }
Aggregating yields the equation
Y _{ i }= q + bX _{ i }
Ecologic regression then yields the correct estimate of the risk difference b. Assuming q _{ i }= q and b _{ i }= b is not the only way to achieve unbiased results, but it is the easiest to understand. In terms of risk diagrams, the lines describing the individuallevel information in every group coincide. Since the dots representing the ecologic data all lie on this line, the ecologic regression reproduces the individuallevel result.
But if q and b differ between the groups, things can go wrong. This difference corresponds to confounding and effect measure modification between groups. In an important paper, Greenland and Morgenstern [15] described these sources of ecologic bias. We use the analytic framework described above, the risk diagram and the elegant work of Palmquist [16] to show how the magnitude and direction of the ecologic bias from these sources affects biases present at the individuallevel.
Confounding by group
Suppose two groups have the same risk difference b but different background risks, q _{0} ≠ q _{1}:
y _{0j }= q _{0} + bx _{0j }+ e _{0j }
y _{1j }= q _{1} + bx _{1j }+ e _{1j }
Confounding by group
Group 0  Group 1  Crude  

expose  unexposed  sum  expose  unexpose  sum  expose  unexpose  sum  
case  16  12  28  48  24  72  64  36  100 
noncase  24  48  72  12  16  28  36  64  100 
total  40  60  100  60  40  100  100  100  200 
risk  0.40  0.20  0.80  0.60  0.64  0.36  
RD  0.20  0.20  0.28  
X _{ i }  0.40  0.60  
Y _{ i }  0.28  0.72  
n _{ i }  100  100 
The line describing the crude individuallevel information in Table 2 (the table obtained from combining both groups) has a somewhat higher slope, i.e., confounding by group biased the crude risk difference upward (we use the word bias in an epidemiologic sense, the difference between an estimate and the correct value, b). If we know the individuallevel data, including the variable describing group, we can prevent confounding by controlling for group, either by stratifying or adding group as a covariate in a regression.
Figure 4B shows the ecologic data (X _{ i }, Y _{ i }) for the two groups and the result of an ecologic regression. We know something has gone wrong, since a risk difference cannot exceed one, but we cannot determine the source of the problem from ecologic data alone. Unlike the individual case, we cannot control for group by stratifying or including an indicator variable in the regression: the ecologic data provide insufficient information for using these techniques (e.g., with only two ecologic data points, we cannot add a covariate to the ecologic regression).
var[x _{ ij }] is the total exposure variance on the individual level and var_{B}[X _{ i }] is the exposure variance on the ecologic level (the betweengroup variance) weighted using the population of each group.
Bias magnification of confounding by group
We can rewrite equation 9 as
(b _{ e } b) = (b _{ c } b) M
See Palmquist [16] for a closely related result.
Several conclusions follow immediately from equation 10. If there is no confounding by group on the individual level (b _{ c } b = 0), there is no confounding by group on the ecologic level: b _{ e } b = 0. Furthermore, since M is always positive, both biases are in the same direction. Suppose, as in the example, that we use the mean exposure in each group as the ecologic measure of exposure. M is then always at least one, i.e., the amount of confounding by group on the ecologic level equals or exceeds the amount on the individual level (appendix 4). (Note that the derivation of (10) assumes that var_{B}[X _{ i }] is nonzero. When this assumption is violated, as occurs when the X _{ i }are equal in all groups, there is no confounding by group on the individual level. However, ecologic regression is uninformative since division by zero makes b _{ e }and M undefined).
Equation (10) tells us that the relative amount of confounding by group on the ecologic and individual level stems from the reduction of exposure variance caused by aggregation. The information loss from discarding withingroup exposure variance magnifies the bias already present on the crude individual level. However, if exposure within groups is homogeneous, i.e., everyone within a group has the same exposure, M equals one and the amount of confounding by group is equal on the ecologic and individual levels. This formalizes, for one source of bias, the simple idea that ecologic studies with homogeneous exposures are really just individuallevel studies.
Effect modification of the risk difference by group
Suppose two groups have the same background risk (q) but different risk differences (b _{0} ≠ b _{1}):
y _{0j }= q + b _{0} x _{0j }+ e _{0j }
y _{1j }= q + b _{1} x _{1j }+ e _{1j }
Effect modification of the risk difference by group
Group 0  Group 1  Crude  

expose  unexpose  sum  expose  unexpose  sum  expose  unexpose  sum  
case  20  10  30  48  12  60  68  22  90 
noncase  80  90  170  32  108  140  112  198  310 
total  100  100  200  80  120  200  180  220  400 
risk  0.2  0.1  0.6  0.1  0.378  0.1  
RD  0.1  0.5  0.278  
X _{ i }  0.5  0.4  
Y _{ i }  0.15  0.3  
n _{ i }  200  200 
We can use equation 10 with one small change to describe the implications of effect modification of the risk difference by group. Since b is no longer constant, we use b _{ w }, a weighted average of the risk differences b _{ i }in the groups with weights depending on the withingroup exposure variances (b _{ w }is also obtained by regressing the individuallevel data while adjusting for group; see appendix 3):
(b _{ e } b _{ w }) = (b _{ c } b _{ w }) M
As Figure 6 illustrates, the tiny discrepancy between the crude risk difference b _{ c }and the weighted average b _{ w }is multiplied by a large magnification factor of 99, producing a large bias on the ecologic level. The difference between b _{ c }and b _{ w }is not usually considered a bias on the individual level. For individuallevel studies, some epidemiologists might report the b _{ i }if they consider the variation between groups important; others might ignore it. While b _{ w }is not a commonly used data summary of the b _{ i }, it helps us understand a source of ecologic bias when there is effect modification of the risk difference by group.
Magnification factor
Bias magnification
The bias magnification equation (equation 14), governs bias from both sources – confounding by group and effect modification of the risk difference by group – in an additive fashion, i.e., it can be applied to both sources of bias separately or together [11]. Application of the bias magnification equation to these sources of ecologic bias brings together two lines of research. Greenland and Morgenstern showed that both confounding by group and effect measure modification by group could cause ecologic bias [15]. The bias magnification equation can be derived by partitioning covariance and variance within and between groups (appendix 3). This approach has a distinguished history, only some of it mentioned here. Robinson's landmark 1950 paper [17] discussed such partitions in terms of correlation coefficients. Duncan et al. discussed regression coefficients [18]. Piantadosi et al. derived the bias magnification equation, but they did not emphasize the magnification factor or discuss the role of effect measure modification by group [19]. Palmquist derived a generalized form of a closely related equation using matrix methods [16]. Palmquist's insightful work, discussed by King [10], stresses the role of the inflation factor – the magnification factor minus one – and its effect on individuallevel bias (appendix 3). Palmquist and King do not discuss the individuallevel bias (which they call the specification shift) in terms of confounding and effect measure modification, in part because these authors are social scientists. King considers b _{ c }as his parameter of interest, biased by grouping. In our context, which is epidemiology, the crude risk difference b _{ c }is considered biased by ignoring groups.
Nondifferential misclassification of binary exposure
Here, nondifferential exposure misclassification (NDEM) means that the proportion of people misclassified by exposure does not depend on disease status. Sensitivity s refers to the proportion of exposed people classified as exposed; specificity t means the proportion of nonexposed people classified as nonexposed (More general definitions may regard s and t as probabilities). NDEM causes bias towards the null in individuallevel studies, but away from the null in ecologic studies [20]. This difference has been called one of the most significant problems of ecologic studies [6], so we conclude this exposition with an explanation of the mechanism in this simple case.
Nondifferential exposure misclassification in a 2 × 2 table
Correct  Misclassified  

expose  unexpose  sum  expose  unexpose  sum  
Case  a _{ i }  b _{ i }  a _{ i }+b _{ i }  sa _{ i }+ (1t)b _{ i }  (1s)a _{ i }+tb _{ i }  a _{ i }+b _{ i } 
noncase  c _{ i }  d _{ i }  c _{ i }+d _{ i }  sc _{ i }+ (1t)d _{ i }  (1s)c _{ i }+td _{ i }  c _{ i }+d _{ i } 
Total  a _{ i }+c _{ i }  b _{ i }+d _{ i }  n _{ i }  s(a _{ i }+c _{ i }) + (1t)(b _{ i }+d _{ i })  (1s)(a _{ i }+c _{ i }) + t(b _{ i }+d _{ i })  n _{ i } 
X _{ i }  (a _{ i }+c _{ i })/n _{ i }  s(a _{ i }+c _{ i })/n _{ i }+ (1t)(b _{ i }+d _{ i })/n _{ i }  
Y _{ i }  (a _{ i }+b _{ i })/n _{ i }  (a _{ i }+b _{ i })/n _{ i } 
U _{ i }= λX _{ i }+ (1  t)
λ = s + t  1
where λ is Youden's index [1] (for details of this section, see appendix 7). Since sensitivity and specificity must be between zero and one, λ must be between 1 and 1. Sensitivity and specificity are typically greater than 0.5 (i.e., better than random), so we assume λ is between 0 and 1.
When λ is between 0 and 1, b _{ e }' is farther away from the null than the true ecologic estimate and has the same sign.
Effect of nondifferential exposure misclassification on individual and ecologic studies
Group 0  Group 1  Crude  

Correct  
expose  unexpose  sum  expose  unexpose  sum  expose  unexpose  sum  
cases  160  80  240  720  10  730  880  90  970 
noncases  40  720  760  180  90  270  220  810  1030 
total  200  800  1000  900  100  1000  1100  900  2000 
risk  0.8  0.1  0.8  0.1  0.8  0.1  
RD  0.7  0.7  0.7  
X _{ i }  0.20  0.90  
Y _{ i }  0.24  0.73  
Misclassify  
expose  unexpose  sum  expose  unexpose  sum  expose  unexpose  sum  
cases  144  96  240  578  152  730  722  248  970 
noncases  176  584  760  162  108  270  338  692  1030 
total  320  680  1000  740  260  1000  1060  940  2000 
risk  0.45  0.14  0.78  0.58  0.68  0.26  
RD  0.31  0.20  0.42  
X _{ i }  0.32  0.74  
Y _{ i }  0.24  0.73 
It is important to note that not all forms of exposure measurement error will bias ecologic studies away from the null. We examined a particular error model above: NDEM of binary exposure at the individual level with sensitivities and specificities not changing between groups. Other error models lead to other results [11]. For example, application of the classical error model to a continuous exposure variable biases results toward the null in ecologic studies.
Discussion
Roughly speaking, the bias magnification equation says that ecologic bias equals individuallevel bias magnified. More precisely, the reduction in exposure variance caused by aggregation (loss of information) magnifies the individuallevel bias due to confounding by group and/or effect modification of the risk difference by group. Other things equal, the magnification factor is maximized if exposure within groups is dichotomous [11]. Thus textbook examples, which typically use twobytwo tables, tend to overstate the amount of bias magnification occurring in many real studies.
Bias magnification provides a useful tool for theoretical considerations of ecologic bias. Does it have any practical use? When designing ecologic studies, one should try to minimize M by increasing betweengroup differences in exposure while making withingroup exposure as homogeneous as possible; see also [7]. Bias magnification also suggests an approach to sensitivity analysis of ecologic bias from confounding by group and/or effect modification of the risk difference by group. Assume an individuallevel model as a reference. The ecologic bias has two components: the amount of bias caused by ignoring group on the individuallevel (b _{ c } b _{ w }), and the magnification of this bias caused by aggregation (M). When analyzing ecologic data, we will not know the size of the bias on the individual level, but we can make various assumptions. For example, we may be able to make educated guesses about the direction and possible amount of confounding by group on the individual level. We may then be able to estimate the magnification factor. For binary exposures, we can compute M from the ecologic data alone (appendix 8). In other situations we may be able to estimate M from samples of the study population or from routinely collected environmental data. For example, we might use air pollution measurements and spatial statistics to estimate the variation in exposure within cities, comparing it to variation in average air pollution between cities. If M is small, we gain confidence that the ecologic bias isn't too different from the bias on the individual level. See [21] for another approach to sensitivity analysis of ecologic bias.
Ecologic studies using exposure variables of the type "fraction exposed" may be particularly problematic. Such ecologic exposure variables are the aggregated form of binary exposures on the individual level. Other things equal, use of such variables tends to maximize the magnification factor (increasing any bias present due to confounding by group or effect measure modification by group), increase bias in nonlinear models, and bias results away from the null when nondifferential exposure misclassification occurs. Studies with small variation between average exposures (as in Figure 5F) are particularly worrisome.
The approach discussed here examines three important sources of ecologic bias: confounding by group, effect modification of the risk difference by group, and nondifferential exposure misclassification. It does not take into account other potential problems, e.g., confounding within groups or effect measure modification within groups (However, confounding within groups alone does not cause ecologic bias when the relationship between exposure and outcome is linear; see appendix 9. The plausibility of the linearity assumption must be carefully considered).
In this paper we have employed a simple, abstract approach based on several assumptions: availability of the same types of information on both individual and group levels, use of average group exposure as the ecologic exposure measure, linear models, weighted least squares regression, estimation of the risk difference. Our purpose was to display, as simply as possible, the underlying mechanisms causing the magnification of individual bias upon aggregation into groups. The loss of information about withingroup exposure variance is seen to be the culprit.
The ideas here can be extended, with some modifications of results, to examine additional issues: inclusion of covariates, confounding and effect measure modification within groups, grouplevel exposure measures other than means, and partially ecologic studies [4, 11]. This paper has focused on the risk difference, but the results can be readily applied to the rate difference and studies with continuous outcomes (appendix 3). Generalization to the more commonly used relative risks and rate ratios is underway (see also [21]).
In addition to theoretical investigations like this one, we also need to know more about the amount of ecologic bias encountered in practice [7, 22–24]. By helping us focus on how ecologic studies go astray, we hope to move toward the goal of domesticating ecologic bias: treating it as another source of epidemiologic bias that needs to be analyzed and quantified [22].
Mathematical appendix
1. Linear risk functions and aggregation
Assume risk to individuals is a linear function of exposure x
r _{ ij }= q _{ i }+ b _{ i } x _{ ij }
We index groups with i and subjects with j, and allow the background risk q _{ i }and risk difference b _{ i }to vary between groups (Alternatively, one can think in terms of an unmeasured grouplevel covariate Z _{ i }: q _{ i }= q + γZ _{ i }, b _{ i }= b + ηZ _{ i }). Conceiving of risks as probabilities of developing disease, the expected value of the binary outcome for individual y _{ ij }is equal to their risk, so that
y _{ ij }= q _{ i }+ b _{ i } x _{ ij }+ e _{ ij }
where e _{ ij }is an error term. Averaging within groups (of size n _{ i }) produces the aggregate equation
Y _{ i }= q _{ i }+ b _{ i } X _{ i }+ e _{ i }
X _{ i }and Y _{ i }are the average exposure and outcome per group (See [14, 21] for an indepth discussion of statistical models in ecologic studies). The e _{ ij }and e _{ i }vanish under expectation.
Alternatively, we can think of the risks as proportions. Under the proportion model, the e _{ ij }and e _{ i }are residuals (e _{ i }then vanishes in equation A4 because the sum of residuals within groups equals zero). Both the probability and proportion interpretations can be applied in this paper: the proportion model may help in thinking about ecologic bias in particular data sets. For example, the individuallevel model(s) assumed for an analysis need not be correct; instead it is a reference against which we measure ecologic bias.
We assumed a linear risk model (A2) at the individual level. Although very simple, it still yields insight into many aspects of ecologic bias (Nonlinear functions, described below, add some additional features). Linear risk models can also be easily analyzed using ordinary least squares (OLS). The risk difference (b _{ i }) is the natural effect measure to use in this situation. For example, applying OLS to the individuallevel data in a twobytwo table yields q _{ i }and b _{ i }(OLS picks the line that runs through the mean values of the outcomes at the two exposure levels). Although OLS is not commonly used for analyzing binary outcome data, it simplifies the understanding of ecologic bias. OLS, and other methods described here, are directly applicable to many studies of continuous outcomes.
Notation for a general twobytwo table
exposed  unexposed  sum  

cases  p _{ i } m _{ i 1}  q _{ i } m _{ i 0}  p _{ i } m _{ i 1}+q _{ i } m _{ i 0} 
noncases  (1p _{ i })m _{ i 1}  (1q _{ i })m _{ i 0}  (1p _{ i })m _{ i 1}+ (1q _{ i })m _{ i 0} 
total  m _{ i 1}  m _{ i 0}  n _{ i }= m _{ i 1}+m _{ i 0} 
risks  p _{ i }  q _{ i }  
RD  p _{ i }q _{ i }  
X _{ i }  m _{ i 1} /n _{ i }  
Y _{ i }  (p _{ i } m _{ i 1}+q _{ i } m _{ i 0})/n _{ i } 
Equation A5 is identical to A4 (except for e _{ i }).
2. Extensions; nonlinear risk functions and pure specification bias
Equations 1–3 (in the main text) and Figure 1 were constructed to describe twobytwo tables and risks, but the approach is readily extended to rates, continuous outcomes and continuous exposures. Instead of modeling risks in a closed cohort, we can also examine incident cases in persontime [11]. In this type of individuallevel study, we would know the interior of the table (the number of exposed and unexposed cases); we could therefore compute the rates for the exposed and unexposed as well as the rate difference. In an ecologic study of this type, we would know only the marginal rate and the marginal exposure distribution. Rate diagrams are very similar to risk diagrams except that the y axis has no upper bound. For continuous outcomes y _{ ij }with normally distributed errors e _{ ij }, OLS is a conventional model of analysis; b is then the change in outcome per unit change in exposure. Instead of restricting x _{ ij }to zero or one as in a binary exposure, we can also let x _{ ij }be a continuous measure of exposure. For equations 1–3 (and Figure 1) to hold, the risk function would have to be linear but nonlinear functions are also possible.
Instead of the linear risk function (A2), suppose we assume the following loglinear model:
y _{ ij }= exp[q + bx _{ ij }] + e _{ ij }
Aggregating yields (ignoring error terms)
where ${\sigma}_{i}^{2}$ is the exposure variance within group i [9]. More generally, we can approximate (A8) by applying Taylor series and aggregation to (A6) (see also [25–27]).
The exponential of b _{ e }now estimates the relative risk. As shown by (A9), in the absence of other sources of ecologic bias, loglinear ecologic regression is subject to pure specification bias, approximated by the second term in (A9). For such models, the withingroup exposure variances can often be expected to covary with average exposures. There is little or no bias if b is small (low curvature), the within group exposure variance (${\sigma}_{i}^{2}$) does not depend on X _{ i }, or exposure is uniform within groups (${\sigma}_{i}^{2}$ = 0), results consistent with those found by Richardson et al. [9] for the normal distribution case. Risk diagrams drawn using logtransformed risks turn exponential risk functions into straight lines; the line describing the upper bound of the error in Figure 2 becomes curved (bowing downward).
3. Bias magnification equation
Subtracting (b _{ c } b _{ w }) from both sides of equation A15 yields:
(b _{ e } b _{ c }) = (b _{ c } b _{ w })(M  1) = (b _{ c } b _{ w }) F
Note that cov[q _{ i }, x _{ ij }] = cov_{B}[q _{ i }, X _{ i }], a consequence of using population weighting. Confounding by group is absent if cov_{B}[q _{ i }, X _{ i }] = 0, i.e., the background risks and average exposures are uncorrelated (e.g., q _{0} = q _{1} for two 2 × 2 tables).
When M equals one – i.e., exposure within groups is homogeneous – equation A15 shows that the ecologic and individuallevel results are equal. This result, desirable for the nominally ecologic study, is a consequence of using population weighting; unweighted ecologic regression will generally produce different results from the individuallevel analysis. For example, in (A19) the weighted and unweighted covariances of X _{ i }and q _{ i }will usually not be equal [11].
4. M ≥ 1 when X _{ i }is the ecologic exposure measure
5. Effect measure modification and b _{ c }
where p _{ i }is the risk in the exposed, q _{ i }is the risk in the unexposed and we sum over groups i.
where the w _{ i }are nonnegative weights. Thus b _{ c }must be between the minimum and maximum values of b _{ i }. For additional discussion of when b _{ c }and b _{ e }are bounded, see [11].
6. Computation of b _{ w }for Table 3, Figure 6
b _{ w }is a weighted average of the b _{ i }using weights equal to group size times the exposure variance within the group:
w _{0} = n _{0} var_{0}(x _{0j }) = 200(X _{0})(1X _{0}) = 200(0.5)(0.5) = 50
w _{1} = n _{1} var_{1}(x _{1j }) = 200(X _{1})(1X _{1}) = 200(0.4)(0.6) = 48
7. Nondifferential exposure misclassification
For s = t, X _{ c }= 0.5.
8. Computation of M when exposure is binary
where $\overline{X}$ is the populationweighted mean of the X _{ i }. Use equation A13 for var_{B}[X _{ i }].
9. Confounding within groups
Assume a reference individuallevel model with a linear relationship between outcome and exposure. Assume that outcome is also related to an individuallevel covariate z _{ ij }via a possibly nonlinear function h():
y _{ ij }= q + bx _{ ij }+ h(z _{ ij }) + e _{ ij }
Aggregation produces
Y _{ i }= q + bX _{ i }+ H _{ i }(z _{ ij }) + e _{ i }
where H _{ i }(z _{ ij }) is the average value of h(z _{ ij }) within group i. The crude individuallevel estimate b _{ c }is derived by inserting equation A33 into equation A10 and expanding:
Partitioning the covariance within and between groups yields
The individuallevel estimate, equation A37, is biased by two terms: confounding within groups and confounding between groups. The ecologic estimate, equation A38, is biased only by confounding between groups (These results remain true if h() is linear, e.g., h(z _{ ij }) = γz _{ ij }and H(z _{ ij }) = γZ _{ i }). Note that an individuallevel variable (z _{ ij }) can cause confounding between groups even if it doesn't cause confounding within groups. For models like equation A33, confounding within groups alone does not bias the ecologic estimate. For models that are nonlinear in both exposure and covariates, confounding within groups remains important. For further discussion of confounding within groups, see [11, 21].
The approach of assuming an individuallevel model, aggregating to obtain an ecologic model, and then comparing biases on the individual and group level is very powerful [11].
Abbreviations
 NDEM:

nondifferential exposure misclassification
 OLS:

ordinary least squares
 RD:

risk difference
Declarations
Acknowledgements
The project described was supported by grant number 5P42ES007381 from the National Institute of Environmental Health Sciences (NIEHS), NIH. Its contents are solely the responsibility of the authors and do not necessarily represent the official views of NIEHS. Thanks to David Ozonoff for helpful discussions and editing suggestions and to the reviewers for thoughtful comments.
Authors’ Affiliations
References
 Last JM: A Dictionary of Epidemiology. 1995, New York, NY: Oxford University Press, ThirdGoogle Scholar
 DiezRoux AV: Bringing context back into epidemiology: variables and fallacies in multilevel analysis. Am J Public Health. 1998, 88: 216222.View ArticleGoogle Scholar
 Greenland S: Ecologic versus individuallevel sources of bias in ecologic estimates of contextual health effects. Intern J Epidemiol. 2001, 30: 13431350. 10.1093/ije/30.6.1343.View ArticleGoogle Scholar
 Webster T: Crosslevel bias in partially ecologic studies. Spatial Epidemiology Conference, London 2006: Conference Proceedings. 23–25 May. 2006, London. Small Area Health Statistics Unit, Imperial College, 127132. [http://www.spatepiconf.org/default.htm]Google Scholar
 Jackson C, Best N, Richardson S: Improving ecological inference using individuallevel data. Statist Med. 2006, 25: 21362159. 10.1002/sim.2370.View ArticleGoogle Scholar
 Künzli N, Tager IB: The semiindividual study in air pollution epidemiology: a valid design as compared to ecologic studies. Environ Health Perspect. 1997, 105: 10781083. 10.2307/3433849.View ArticleGoogle Scholar
 Greenland S: Divergent biases in ecologic and individuallevel studies. Stat Med. 1992, 11: 12091223. 10.1002/sim.4780110907.View ArticleGoogle Scholar
 Morgenstern H: Ecologic studies. Modern Epidemiology. Edited by: Rothman KJ, Greenland S. 1998, Philadelphia, PA: LippincottRaven, 459480. SecondGoogle Scholar
 Richardson S, Stücker I, Hémon D: Comparison of relative risks obtained in ecological and individual studies: some methodological considerations. Int J Epidemiol. 1987, 16: 111120. 10.1093/ije/16.1.111.View ArticleGoogle Scholar
 King G: A Solution to the Ecological Inference Problem: Reconstructing Individual Behavior from Aggregate Data. 1997, Princeton, NJ: Princeton University PressGoogle Scholar
 Webster T: Bias in Ecologic and Semiindividual Studies. DSc thesis. 2000, Boston University School of Public Health, Department of Environmental HealthGoogle Scholar
 Susser M: The logic in ecological: I. The logic of analysis. Am J Public Health. 1994, 84: 825829.View ArticleGoogle Scholar
 Goodman LA: Ecological regressions and the behavior of individuals. Am Sociol Rev. 1953, 18: 663664. 10.2307/2088121.View ArticleGoogle Scholar
 Wakefield J: Ecological inference for 2 × 2 tables. J R Statist Soc A. 2004, 167: 385445. 10.1111/j.1467985x.2004.02046_1.x.View ArticleGoogle Scholar
 Greenland S, Morgenstern H: Ecological bias, confounding, and effect modification. Int J Epidemiol. 1989, 18: 269274. 10.1093/ije/18.1.269.View ArticleGoogle Scholar
 Palmquist BL: Ecological Inference, Aggregate Data Analysis of United States Elections, and the Socialist Party of America. PhD thesis. 1993, University of California Berkeley, Political Science DepartmentGoogle Scholar
 Robinson WS: Ecological correlation and the behavior of individuals. Am Sociol Rev. 1950, 15: 351357. 10.2307/2087176.View ArticleGoogle Scholar
 Duncan OD, Cuzzort RP, Duncan D: Statistical Geography: Problems in Analyzing Areal Data. 1961, Glencoe, IL: Free PressGoogle Scholar
 Piantadosi S, Byar DP, Green SB: The ecological fallacy. Am J Epidemiol. 1988, 127: 893904.Google Scholar
 Brenner H, Savitz DA, Jöckel KH, Greenland S: Effects of nondifferential exposure misclassification in ecologic studies. Am J Epidemiol. 1992, 135: 8595.Google Scholar
 Wakefield J: Sensitivity analysis for ecological regression. Biometrics. 2003, 59: 917. 10.1111/15410420.00002.View ArticleGoogle Scholar
 Webster T: Commentary: Does the spectre of ecologic bias haunt epidemiology?. Int J Epidemiol. 2002, 31: 161162. 10.1093/ije/31.1.161.View ArticleGoogle Scholar
 Lagarde F, Pershagen G: Parallel analysis of individual and ecologic data on residential radon, cofactors, and lung cancer in Sweden. Am J Epidemiol. 1999, 149: 268274.View ArticleGoogle Scholar
 Björk J, Strömberg U: Effects of systematic exposure assessment errors in partially ecologic casecontrol studies. Int J Epidemiol. 2002, 31: 154160. 10.1093/ije/31.1.154.View ArticleGoogle Scholar
 Plummer M, Clayton D: Estimation of population exposure in ecological studies. J R Statist Soc B. 1996, 58: 113126.Google Scholar
 Best N, Cockings S, Bennett J, Wakefield J, Elliott P: Ecological Regression Analysis of Environmental Benzene Exposure and Childhood Leukaemia: Sensitivity to Data Inaccuracies, Geographical Scale and Ecological Bias. J R Statist Soc A. 2001, 164: 155174. 10.1111/1467985X.00194.View ArticleGoogle Scholar
 Richardson S, Montfort C: Ecological correlation studies. Spatial Epidemiology: Methods and Applications. Edited by: Elliott P, Wakefield JC, Best NG, Briggs DJ. 2000, Oxford: Oxford University Press, 205220.Google Scholar
Copyright
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.