Signature
p_c = p_e * RR_U / (1 + p_e * (RR_U - 1)); PAF_M = p_c * (RR_C - 1) / RR_C
| Inputs | Definition | Unit |
|---|---|---|
p_e | Proportion of the whole population who are exposed | proportion |
RR_U | Unadjusted (crude) relative risk of disease in exposed against unexposed people in the population | ratio |
RR_C | Causal, confounding-adjusted relative risk of disease in exposed against unexposed people, or among the exposed where it varies across confounder strata | ratio |
p_c | Proportion of all cases who were exposed, recovered from the population prevalence and the unadjusted ratio | proportion |
|---|---|---|
PAF_M | Share of all cases in the population that would not occur without the exposure | proportion |
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
Summary-data fraction in named cells
With the inputs in cells named PrevalencePopulation, CrudeRelRisk and CausalRelRisk, the two formulas return, in order, cells named CaseShareRecovered and PafSummaryData.
=PrevalencePopulation*CrudeRelRisk/(1+PrevalencePopulation*(CrudeRelRisk-1)); =CaseShareRecovered*(CausalRelRisk-1)/CausalRelRisk
Assumptions
Constant causal relative risk or the ratio among the exposed in the summary-data fraction
RR_C is constant across confounder strata or, where it varies, is the causal relative risk among exposed people, as in HE-EX-ATTF-007. Ferguson and colleagues state that with the overall causal ratio the approach is asymptotically correct only without effect modification, although it should behave better than Levin's approach even with it, and that estimates of the ratio among the exposed are usually unavailable from published summary data. Their Discussion adds that a constant causal relative risk will usually be dubious.
Both relative risks transportable to the target population
p_e describes the population whose fraction is wanted, and RR_U and RR_C are usually estimated elsewhere. Ferguson and colleagues note that transporting the causal ratio is an issue for Levin's approach too, and that transporting the unadjusted ratio is an additional assumption with no good reason to expect it to hold.
Worked examples
Summary-data fraction in the article's confounded adults
The article's illustrative prevalence 0.26, crude ratio 3.6533 and adjusted ratio 2 recover the exposed share 0.5621 and the fraction 0.2810, with no access to the age table.
p_e = 0.26; RR_U = 3.6533; RR_C = 2; p_c = 0.5621; PAF_M = 0.2810
Summary-data fraction in the Ferguson hypertension table
In the hypothetical population of Ferguson and colleagues, with the unadjusted ratio held to four decimals (printed 1.83, exactly 11/6), the prevalence 0.45 and causal ratio 1.5 give their 0.6 and 0.2.
p_e = 0.45; RR_U = 1.8333; RR_C = 1.5; p_c = 0.6000; PAF_M = 0.2000
Summary-data fraction without confounding
A limiting case for checking an implementation. With both ratios equal to 2 the result is Levin's form at the same prevalence, 0.26 / 1.26 = 0.2063.
p_e = 0.26; RR_U = 2; RR_C = 2; p_c = 0.4127; PAF_M = 0.2063
Summary-data fraction with the ratio among the exposed under effect modification
The same example with the causal ratio among exposed people, 2.25, returns the correct fraction of 0.385, as Ferguson and colleagues state.
p_e = 0.45; RR_U = 2.75; RR_C = 2.25; p_c = 0.6923; PAF_M = 0.3846
Common errors
Adjusted ratio entered in the Bayes step
The first part needs the unadjusted ratio. Entering the adjusted 2 of the article's table in place of 3.6533 gives an exposed share of 0.4127 against 0.5621 and a fraction of 0.2063, which is Levin's biased value and not the true 0.2810 (derived).
Crude ratio in Levin's form when a causal ratio exists
Ferguson and colleagues advise against Levin's form with an unadjusted ratio. It can flip the direction of the fraction when RR_U is below 1 and RR_C above 1. At an illustrative prevalence of 0.3, RR_U of 0.8 and RR_C of 1.5, it gives minus 0.0638 where this formula gives plus 0.0851.
Overall causal ratio under effect modification
With stratum ratios of 1.5 and 3 in the example of Ferguson and colleagues, the overall causal ratio of 2 gives 0.346 and Levin's form 0.31, against the correct 0.385. The formula still does better than Levin's form, but the ratio it needs is the one among exposed people, 2.25.
Sources
Ferguson re-expression of Miettinen's estimand
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 A re-expression of Miettinen's PAF, equation 4, prints the formula from the population prevalence, the causal and the unadjusted relative risks, and states that it simplifies to Levin's formula when RR_U equals RR_C. Section What if there is effect modification across strata? gives 0.346, 0.385, Levin's 0.31 and the ratio of 2.25. Section Discussion gives the transportability caveat, the advice against Levin's formula with unadjusted ratios and the doubt over a constant causal relative risk.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0
