← Methods repository
concept

Attributable Risk and Population Attributable Fraction

Attributable risk (AR) is the absolute excess risk in exposed persons compared to unexposed; the attributable fraction among the exposed (AF_exposed) converts that to the proportion of exposed cases attributable to the exposure; and the population attributable fraction (PAF, Levin's formula) extends to the whole population by weighting by exposure prevalence — together they answer not just how strong an association is, but how much of the disease burden would disappear if the exposure were eliminated, under an explicit causal assumption.

Inferential_Statisticsstatisticseffect-measuresepidemiologypublic-healthattributable-risk
Methods reference only. Use primary source citations and local policy before applying this in a study protocol, regulatory submission, payer dossier, or clinical decision.

In plain language

Attributable risk (AR) measures how many more disease events occur among exposed people compared to unexposed people — the raw excess risk you carry because of the exposure. The population attributable fraction (PAF) extends this to ask what percentage of ALL disease cases in the entire population could theoretically be prevented if the exposure were completely eliminated. Both measures are powerful for public health planning and payer submissions, but they carry one strict requirement: the exposure-disease link must be genuinely causal, not just an association — a confounded PAF is scientifically meaningless.

The measure family: AR, AF_exposed, and PAF

Three related but distinct quantities address the "how much burden is due to this exposure?" question, and confusing them is one of the most common errors in burden-of-disease reporting.

Attributable risk (AR), also called the risk difference among the exposed or the excess risk, is: AR = risk_exposed − risk_unexposed. It answers "by how much does being exposed increase my absolute probability of disease?" Like all absolute risk differences, AR is clinically concrete and directly translatable to number needed to treat (NNT = 1/AR), but it is sensitive to background risk — the same causal RR produces a larger AR in a high-risk population than in a low-risk one, so AR is not transportable across populations without re-anchoring to local baseline risk.

Attributable fraction among the exposed (AF_exposed), also called the aetiologic fraction or attributable proportion, converts AR to a proportion: AF_exposed = AR / risk_exposed = (RR − 1) / RR. It answers "among all cases in the exposed group, what fraction would not have occurred if the exposed group had the unexposed risk level?" A value of 0.5 means half the events in the exposed group are attributable to the exposure.

Population attributable fraction (PAF) extends AF_exposed to the whole population by weighting by exposure prevalence (p, the proportion of the population that is exposed): PAF = p × (RR − 1) / (p × (RR − 1) + 1). This is Levin's formula (1953). It answers "if the exposure were completely eliminated from the population, what fraction of ALL cases would be prevented?" PAF is the measure used in burden-of-disease analyses, payer narratives, and public health priority-setting. It is prevalence-dependent: the same RR yields a higher PAF in a population with greater exposure prevalence.

Levin's formula and Miettinen's adjusted estimator

Levin's formula is derived from the marginal risks: PAF = (R_total − R_unexposed) / R_total, which algebraically reduces to p(RR−1)/(p(RR−1)+1). This is the version in most introductory epidemiology texts and burden-of-disease papers. It is valid only when RR is the unconfounded, marginal (causal) risk ratio and p is the exposure prevalence in the source population.

A critical and frequently overlooked subtlety: using Levin's formula with a confounder-adjusted RR from a multivariable regression model is mathematically incorrect under confounding. The Levin formula assumes the RR is the crude marginal risk ratio; substituting an adjusted (conditional) RR produces a biased PAF because it conflates marginal and conditional quantities. The correct approach when using an adjusted RR is Miettinen's case-based formula (1974): PAF = proportion_of_cases_exposed × (1 − 1/RR_adjusted). This uses the adjusted RR but weights by the fraction of cases (not the fraction of the population) that are exposed — a subtle but important difference. G-computation (outcome regression standardization) and targeted maximum likelihood estimation (TMLE) provide doubly robust PAF estimates that accommodate full confounding adjustment and complex covariate structures.

Interpreting the output

Taking the worked example — PAF = 16.7% (illustrative 95% CI 8%–25%) — two layers of interpretation are required.

Formal interpretation: Under the assumptions that (1) the RR of 2.0 is causal (no unmeasured confounding, no measurement error, no selection bias) and (2) hypertension could be completely and instantaneously eliminated from this population with all else held fixed, approximately 16.7% of cardiovascular events would not have occurred over this follow-up period. This PAF is prevalence-dependent: the same RR of 2.0 yields PAF ≈ 4.8% in a population where only 5% have hypertension (Levin: 0.05×1 / (0.05×1 + 1) = 0.05/1.05 ≈ 0.048), PAF ≈ 9.1% at 10% prevalence, and PAF = 50% in a population that is universally hypertensive. PAFs across multiple risk factors (hypertension, smoking, diabetes) do NOT sum to 100% and can sum well beyond 100% because the counterfactual elimination of each factor independently removes cases that overlap with those removed by eliminating others. A confounded RR makes the PAF causally meaningless: it would answer a scenario where the association is broken without removing the exposure's causal path, which is not a coherent intervention.

Practical interpretation: In plain English, roughly 1 in 6 cardiovascular events in this population is associated with hypertension at today's prevalence levels — but only if the link is genuinely causal, and only if hypertension could be fully eliminated. In practice, treating hypertension reduces but does not eliminate elevated blood pressure, so the realistically preventable fraction is smaller than the PAF. This is the distinction between the population attributable fraction (complete elimination) and the population intervention effect (PIE), which models a realistic partial reduction.

The misuse catalog

Rockhill, Newman, and Weinberg (1998) identified four categories of PAF misuse that remain prevalent in HEOR and burden-of-disease literature:

1. Summing PAFs across risk factors. If 50% of cardiovascular events are attributable to hypertension, 30% to smoking, and 25% to diabetes in the same population, these do NOT imply that only 5% are unexplained. PAFs across overlapping exposures can and do sum well beyond 100%, because the counterfactual elimination of each factor independently removes cases that would also be removed by eliminating others. Joint counterfactual analysis or multiplicative decomposition is required for multi-factor attribution.

2. Using confounded or unadjusted RRs. A crude RR inflated by confounding produces a spuriously large PAF that does not correspond to any coherent causal quantity. Always use the best available unconfounded RR estimate, and use Miettinen's formula or g-computation rather than Levin's when an adjusted RR is required.

3. Assuming complete and instantaneous exposure elimination. Real interventions are partial: antihypertensive therapy reduces, not eliminates, elevated blood pressure. The true preventable fraction under a realistic policy is always smaller than the PAF. Report the PAF as an upper bound on what is theoretically preventable, not as the expected impact of a program.

4. Transporting PAFs across populations with different exposure prevalence. A PAF from a European cohort with 15% hypertension prevalence is not applicable to a US cohort with 40% prevalence. Only the (causal, unconfounded) RR is transportable; the PAF must be re-computed using the local prevalence and the transported RR.

RWE and HEOR applications

PAF appears most prominently in two HEOR contexts: burden-of-disease studies and payer narratives linking treatment gaps to outcomes.

Burden of disease: Global burden of disease analyses use risk-weighted PAF estimates to apportion deaths and disability-adjusted life years (DALYs) to modifiable risk factors. In commercial HEOR work, the same logic supports claims such as "X% of hospitalizations for condition Y are attributable to medication nonadherence." These claims almost always rest on an observational RR, embedded causal assumptions, and a specific population's nonadherence prevalence. They overreach causally whenever the RR is confounded, and honest HEOR dossiers distinguish the associative PAF from a causal PAF while providing sensitivity analyses over the RR and prevalence assumptions.

Connection to attributable costs: The PAF logic extends naturally to expenditure. Attributable cost = total condition cost × PAF, where PAF is computed from the fraction of total spending in a payer dataset that could be prevented by eliminating the exposure. The `all-cause-vs-attributable-costs-rwe` concept covers the HEOR-specific approach to separating all-cause and attributable spending; the PAF entry here provides the rate-based foundation.

Pros, cons, and trade-offs

PAF vs attributable risk (AR): PAF incorporates exposure prevalence and is the population-level burden measure relevant to payers and public health authorities. AR is the individual-level excess risk in exposed persons; it is the input to NNT and is most useful for communicating to a clinician or patient. Neither is universally preferable — they answer different questions. Use AR when the audience is the individual clinician; use PAF when the audience is a budget-holder or policy-maker allocating prevention resources.

PAF vs relative risk (RR/HR): RR is more stable across populations with different baseline risk, making it the right quantity for transporting effects between studies. PAF is population-specific because it depends on prevalence; the recommended approach is to transport the RR and combine it with local prevalence to produce a locally valid PAF. Use RR for modelling and effect transportation; use PAF for burden statements anchored to a specific population.

Adjusted vs unadjusted PAF: Unadjusted Levin's PAF is biased whenever the RR is confounded. Miettinen's case-based formula handles an adjusted RR correctly. G-computation provides the most flexible adjusted PAF estimator in the presence of multiple or continuous confounders. Avoid the error of substituting an adjusted RR directly into Levin's formula.

Computational simplicity vs validity: Levin's formula is a three-variable arithmetic expression (p, RR, and the derived PAF) that can be computed in any spreadsheet. This simplicity is also its weakness: every assumption is invisible to a reader who sees only the final number. Always report the RR, the prevalence estimate, its source, and a sensitivity analysis over plausible prevalence ranges.

When to use

Use attributable risk and PAF when: the research question is explicitly about the population burden attributable to a modifiable exposure, and a defensible causal argument for the RR is available; when preparing burden-of-disease sections of HTA dossiers or payer submissions; when combining a published or study-derived RR with local population prevalence to produce a locally relevant PAF for a specific payer or geography; when performing multi-exposure burden analyses with full awareness of the non-summability problem and joint counterfactual structure; or when designing or evaluating a prevention or treatment program and needing an upper-bound estimate of the theoretically preventable fraction.

When NOT to use

When the RR is not causal. A PAF computed from a confounded association answers a non-scientific counterfactual. If adequate confounding adjustment is not possible, clearly label the output as an upper-bound associative estimate, not a preventable burden figure.

When the exposure is not eliminable. Age, genetic sex, and most genetic variants cannot be eliminated from a population. PAF for non-modifiable exposures has no actionable meaning; prefer AR or AF_exposed for characterizing individual-level excess risk attributable to non-modifiable factors.

When summing PAFs across risk factors. Presenting multiple PAFs summing beyond 100% without acknowledging the overlap is misleading. Use joint counterfactual analysis or complementary cumulative risk attribution for multi-factor burden reports.

When transporting a PAF across populations. A published PAF from a different country, patient population, or time period is not applicable without re-anchoring to local exposure prevalence and verifying that the RR is transportable.

When the policy intervention is partial. If the intervention achieves 40% exposure reduction rather than complete elimination, the expected population impact is substantially less than PAF × total cases. Use the population intervention effect (PIE) framework, which models the expected PAF under a realistic partial reduction, rather than Levin's full-elimination PAF.

Worked example

Scenario

A retrospective cohort study examines hypertension (the exposure) and cardiovascular events over a 5-year follow-up. Of 100 hypertensive and 100 normotensive patients selected with similar baseline characteristics, 12 and 6 cardiovascular events occur, respectively. The analyst needs to compute: (1) the attributable risk in the exposed group, (2) the fraction of events among hypertensive patients attributable to hypertension, and (3) the population attributable fraction given that hypertension affects 20% of the broader population. All three measures come from the same 2x2 table and one prevalence figure.

Dataset

Summary 2x2 table from a 5-year retrospective cohort. Exposure = hypertension; outcome = any cardiovascular event. Population prevalence of hypertension p = 0.2.

groupeventsnon_eventstotal_personsobserved_risk
Exposed (hypertension)12881000.12
Unexposed (no hypertension)6941000.06

Steps

  • Risk among exposed = 12/100 = 0.12; risk among unexposed = 6/100 = 0.06.

  • RR = 0.12/0.06 = 2.0; the risk in the hypertensive group is twice that in the unexposed group (a relative doubling, not a doubling of the absolute risk difference); the absolute risk increases by 0.06, or 6 percentage points.

  • AR = 0.12 - 0.06 = 0.06; among every 100 hypertensive persons, 6 events would not have occurred if they carried the same risk as the unexposed, assuming the association is causal.

  • AF_exposed = 0.06/0.12 = 0.5; half of all cardiovascular events among hypertensive patients are attributable to hypertension itself.

  • Population prevalence of hypertension is p = 0.2; twenty percent of the broader population carries the exposure.

  • Levin PAF = 0.2(2.0-1)/(0.2(2.0-1)+1) = 0.2/1.2 = 0.1667; approximately 16.7% of all cardiovascular events in the population are attributable to hypertension.

Result

AR = 0.12 - 0.06 = 0.06 excess events per 100 exposed persons. AF_exposed = 0.06/0.12 = 0.5; half of all events among the hypertensive group are attributable to hypertension. PAF = 0.2(2.0-1)/(0.2(2.0-1)+1) = 0.2/1.2 = 0.1667; roughly 1 in 6 cardiovascular events in this population is tied to hypertension at today's exposure levels — IF the association is causal and IF hypertension could be fully eliminated.

Runnable example

python implementation

Computes attributable risk, attributable fraction among the exposed, and Levin's population attributable fraction from a 2x2 summary table and population exposure prevalence. Also demonstrates Miettinen's case-based formula for use with an adjusted RR, a...

# Attributable Risk and Population Attributable Fraction
# Manual computation from a 2x2 summary table + population exposure prevalence.

# ── Inputs (from the worked example) ──
n_exp,   events_exp   = 100, 12  # exposed: 100 persons, 12 events
n_unexp, events_unexp = 100,  6  # unexposed: 100 persons, 6 events
p_pop = 0.20                      # exposure prevalence in the broader population

# ── 1. Individual-group risks ──
r_exp   = events_exp   / n_exp    # 0.12
r_unexp = events_unexp / n_unexp  # 0.06

# ── 2. Core attributable measures ──
RR         = r_exp / r_unexp                           # Risk ratio
AR         = r_exp - r_unexp                           # Attributable risk (risk diff among exposed)
AF_exposed = AR / r_exp                                # (RR-1)/RR
PAF_levin  = p_pop * (RR - 1) / (p_pop * (RR - 1) + 1)  # Levin's formula

print(f"Risk (exposed)   = {r_exp:.4f}")
print(f"Risk (unexposed) = {r_unexp:.4f}")
print(f"RR               = {RR:.4f}")
print(f"AR               = {AR:.4f}  ({AR*100:.1f}% excess risk)")
print(f"AF_exposed       = {AF_exposed:.4f}  ({AF_exposed*100:.0f}% of exposed cases attributable)")
print(f"PAF (Levin)      = {PAF_levin:.4f}  ({PAF_levin*100:.1f}% of population cases attributable)")

# ── 3. Miettinen's case-based formula (use with adjusted RR from a multivariable model) ──
# PAF = proportion_of_cases_exposed * (1 - 1/RR_adjusted)
# CAUTION: Do NOT substitute an adjusted RR into Levin's formula — that is biased under
# confounding. Miettinen's formula uses the case fraction from your study population.
total_cases    = events_exp + events_unexp
prop_cases_exp = events_exp / total_cases      # fraction of all cases that are exposed
PAF_miettinen  = prop_cases_exp * (1 - 1 / RR)
print(f"\nPAF (Miettinen, case-fraction based) = {PAF_miettinen:.4f}")
print("  Differs from Levin because study has 1:1 sampling; population is 20/80 exposed.")
print("  Use Miettinen's formula when plugging in a confounder-adjusted RR.")

# ── 4. Bootstrap 95% CI for Levin's PAF ──
# For a patient-level dataset, derive CI by bootstrapping individual rows.
# This sketch draws Bernoulli events from a population with 20% exposure prevalence.
import random
random.seed(42)
pop_n_exp, pop_n_unexp = 100, 400   # 20% prevalence in a population of 500

def boot_paf(ne, re, nu, ru):
    ev_e = sum(random.random() < re for _ in range(ne))
    ev_u = sum(random.random() < ru for _ in range(nu))
    r_t = (ev_e + ev_u) / (ne + nu)
    r_u = ev_u / nu
    return (r_t - r_u) / r_t if r_t > 0 else 0.0

boot_pafs = sorted(boot_paf(pop_n_exp, r_exp, pop_n_unexp, r_unexp) for _ in range(2000))
ci_lo = boot_pafs[int(0.025 * 2000)]
ci_hi = boot_pafs[int(0.975 * 2000)]
print(f"\nBootstrap 95% CI for PAF: ({ci_lo:.3f}, {ci_hi:.3f})")
print("  For production: bootstrap from patient-level rows, not aggregate Bernoulli draws.")

# ── 5. Sensitivity: PAF across exposure prevalence values (RR fixed) ──
print("\nPAF sensitivity to exposure prevalence (RR = 2.0):")
for p in (0.05, 0.10, 0.20, 0.30, 0.50):
    paf = p * (RR - 1) / (p * (RR - 1) + 1)
    print(f"  p = {p:.2f}  ->  PAF = {paf:.3f}  ({paf*100:.1f}%)")
print("PAFs across populations are NOT comparable without re-anchoring to local prevalence.")
r implementation

Demonstrates manual computation of AR, AF_exposed, and Levin's PAF alongside epiR::epi.2by2 for automated attributable fraction outputs with confidence intervals. Also documents the AF package for regression-based adjusted AF estimation and provides a...

# Attributable Risk and PAF in R
# Manual computation + epiR::epi.2by2 + AF package for adjusted estimates.

# ── 1. Manual computation from the worked example ──
r_exp   <- 12 / 100   # risk in exposed
r_unexp <-  6 / 100   # risk in unexposed
p_pop   <- 0.20        # population exposure prevalence

RR         <- r_exp / r_unexp
AR         <- r_exp - r_unexp
AF_exposed <- AR / r_exp
PAF_levin  <- p_pop * (RR - 1) / (p_pop * (RR - 1) + 1)

cat(sprintf("AR          = %.4f\n", AR))
cat(sprintf("RR          = %.4f\n", RR))
cat(sprintf("AF_exposed  = %.4f\n", AF_exposed))
cat(sprintf("PAF (Levin) = %.4f (%.1f%%)\n", PAF_levin, PAF_levin * 100))

# ── 2. epiR::epi.2by2 — automated attributable fraction with 95% CIs ──
# install.packages("epiR")
# Matrix layout: [exposed-case, exposed-noncase; unexposed-case, unexposed-noncase]
if (requireNamespace("epiR", quietly = TRUE)) {
  library(epiR)
  dat <- matrix(c(12, 88, 6, 94), nrow = 2, byrow = TRUE,
                dimnames = list(Exposure = c("Exposed", "Unexposed"),
                                Outcome  = c("Case", "Non-case")))
  result <- epi.2by2(dat, method = "cohort.count",
                     conf.level = 0.95, units = 100,
                     interpret = FALSE, outcome = "as.columns")
  print(summary(result))
  # Key outputs in result$massoc.detail:
  #   AFRisk.exp.strata.wald   -- AF among exposed (with 95% CI)
  #   PAFRisk.strata.wald      -- Population AF, Levin (with 95% CI)
} else {
  cat("Install epiR: install.packages('epiR')\n")
}

# ── 3. AF package — regression-based adjusted attributable fraction ──
# The AF package estimates PAF adjusting for confounders via logistic or Cox regression.
# It implements Miettinen's case-fraction approach internally.
# Example (requires patient-level data frame 'df' with: outcome, exposure, covariates):
#   library(AF)
#   model <- glm(outcome ~ exposure + age + sex, data = df, family = binomial())
#   af_result <- AFglm(model, data = df, exposure = "exposure")
#   summary(af_result)    # returns adjusted PAF with 95% CI
cat("\nFor confounder-adjusted PAF: install.packages('AF')\n")
cat("Use AFglm() (binary outcome) or AFcoxph() (time-to-event) with a fitted model.\n")

# ── 4. PAF sensitivity to exposure prevalence (RR fixed) ──
cat("\nPAF sensitivity (RR = 2.0):\n")
for (p in c(0.05, 0.10, 0.20, 0.30, 0.50)) {
  paf <- p * (RR - 1) / (p * (RR - 1) + 1)
  cat(sprintf("  p = %.2f  ->  PAF = %.3f  (%.1f%%)\n", p, paf, paf * 100))
}
cat("Reminder: PAFs across populations are NOT comparable without re-anchoring prevalence.\n")