Signature
C_R = RR_C / RR_U; B_L = C_R * (1 + p_e * (RR_U - 1)) / (1 + p_e * (C_R * RR_U - 1))
| Inputs | Definition | Unit |
|---|---|---|
RR_C | Causal, confounding-adjusted relative risk, constant across confounder strata | ratio |
RR_U | Unadjusted (crude) relative risk of disease in exposed against unexposed people | ratio |
p_e | Proportion of the whole population who are exposed, above 0 | proportion |
C_R | Causal relative risk divided by the unadjusted relative risk, C in Ferguson and colleagues, equal to 1 with no confounding in the risk ratio | ratio |
|---|---|---|
B_L | Levin's form with the causal ratio divided by the true population attributable fraction | ratio |
Function
Attributable fraction function for exposed and population cases under confounding
Maps a relative risk and an exposure share to the fraction of cases that would not occur without the exposure, among exposed people and across a whole population, and to the fraction that a partial change in exposure would prevent. Levin's population formula and the risk form (R_p minus R_u) / R_p have the algebra of HE-FM-PR-003, which computes them for a crude prevalence ratio; the same form with a risk ratio is Levin's, and HE-EX-PR-008 shows the exposed fraction (PR minus 1) / PR at an exposed share of 1. This package adds what those records do not give, Miettinen's case-based formula, its re-expression from published summary estimates, the relative bias of Levin's formula under confounding and two impact fractions. Applying any of these fractions to aggregate spending is the top-down attributable burden HE-FM-COI-002. The absolute difference R_e minus R_u belongs to the Attributable Risk concept. Notation follows the Attributable Fraction article.
Try this function
Implementations
Excel
Levin bias in named cells
With the inputs in cells named CausalRelRiskBias, CrudeRelRiskBias and PrevalenceBias, the two formulas return, in order, cells named ConfoundingRatioCausal and LevinRelativeBias.
=CausalRelRiskBias/CrudeRelRiskBias; =ConfoundingRatioCausal*(1+PrevalenceBias*(CrudeRelRiskBias-1))/(1+PrevalenceBias*(ConfoundingRatioCausal*CrudeRelRiskBias-1))
Assumptions
No effect modification on the relative risk scale in the Levin bias formula
Ferguson and colleagues derive the expression for a causal relative risk that does not vary across confounder strata, since the true fraction is then given by HE-FM-ATTF-002. It treats p_e, RR_U and RR_C as known, so it gives the ratio the estimates converge on and carries no sampling uncertainty. HE-ER-ATTF-012 shows the size of the error when it varies.
Causal relative risk of 1 in the Levin bias formula
At RR_C of 1, Levin's form and the true fraction are both zero and their ratio has no value, and the formula returns its limit, which Ferguson and colleagues give as (1 + p_e (RR_U minus 1)) / RR_U, 0.4626 with the article's p_e and RR_U (computed).
Size of the bias against other biases
Ferguson and colleagues note that the bias of Levin's formula with the causal ratio is generally quite small and likely insubstantial compared with other biases involved in estimating the fraction. The confounding in the article's illustrative table is strong by construction, with a crude ratio nearly twice the adjusted one.
Worked examples
Levin bias in the article's table
With the article's illustrative prevalence 0.26, crude ratio 3.6533 and adjusted ratio 2, Levin's form reaches 73.4% of the true fraction, the ratio of 0.2063 to 0.2810 and of GBP 6.3 million to GBP 8.6 million.
RR_C = 2; RR_U = 3.6533; p_e = 0.26; C_R = 0.5475; B_L = 0.7342
Levin bias in the Ferguson hypertension table
In the hypothetical population of Ferguson and colleagues, the ratio of their 0.184 to 0.2.
RR_C = 1.5; RR_U = 1.8333; p_e = 0.45; C_R = 0.8182; B_L = 0.9184
Levin bias with no confounding
A limiting case for checking an implementation. With both ratios equal, C_R is 1 and the bias ratio is 1 at any prevalence.
RR_C = 2; RR_U = 2; p_e = 0.26; C_R = 1; B_L = 1
Levin bias with the crude ratio below the causal ratio
With illustrative ratios of 1.5 crude and 2 causal at a prevalence of 0.26, Levin's form overstates the fraction by about 20%, the direction Darrow and Steenland report for a crude ratio below the adjusted one.
RR_C = 2; RR_U = 1.5; p_e = 0.26; C_R = 1.3333; B_L = 1.1958
Common errors
Darrow and Steenland's ratio entered as the confounding ratio
Darrow and Steenland define the confounding risk ratio as crude over adjusted, the reciprocal of C_R. Entering 1.8267 from the article's table in place of 0.5475 gives 1.2472, an apparent overstatement of 25% when Levin's form in fact understates the fraction by 27%.
Reading relative bias as absolute bias
Ferguson and colleagues state that the relative bias gets worse as prevalence falls, while the absolute bias approaches 0 as prevalence approaches 0 or 1. With the article's ratios, the relative value is 0.7342 at a prevalence of 0.26 and 0.5652 at an illustrative 0.02, while the absolute gap shrinks, minus 0.0747 at 0.26 and minus 0.0151 at 0.02.
Bias formula applied under effect modification
With the overall causal ratio of 2 in the effect modification example of Ferguson and colleagues, the formula returns 0.8966 while the ratio of Levin's 0.3103 to the correct 0.3846 is 0.8069 (computed). The formula then measures the gap to HE-FM-ATTF-002 and not to the true fraction.
Sources
Ferguson analytic bias of Levin's formula
Ferguson J, Alvarez A, Mulligan M, Judge C, O'Donnell M. Bias assessment and correction for Levin's population attributable fraction in the presence of confounding. European Journal of Epidemiology. 2024;39(2):111-119. Section Analysis of bias in Levin's estimate, assuming no effect modification on the relative risk scale, equation 5, prints the ratio with C the causal over the unadjusted relative risk. It states the value 1 at C of 1, the maximum 1 + (1 minus prevalence) / (prevalence RR_U) as C increases, the worsening of relative bias as prevalence falls, and the absolute bias limits. The Figure 1 legend gives the limit (1 + prevalence (RR_U minus 1)) / RR_U as C approaches 1 / RR_U. Section Discussion calls the bias generally quite small.
Darrow and Steenland simulation of confounding and attributable fraction bias
Darrow LA, Steenland NK. Confounding and bias in the attributable fraction. Epidemiology. 2011;22(1):53-58. The abstract defines the confounding risk ratio as the crude over the adjusted relative risk and bias as the ratio of the incorrectly to the correctly calculated fraction. Using generated data it reports underestimation for confounding risk ratios above 1, overestimation below 1 and the greatest bias at the lowest exposure prevalence.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0
