A 2025 paper in Communications Medicine measured something I think about often on this site: the gap between how long a person lives and how many of those years are lived in good health. The paper found this gap averages around nine years globally, and that it varies by region in ways tied to life expectancy, income, and disease burden. The data behind it, from the World Health Organization and the United Nations, is entirely public. The code behind it is not.

That combination, open data and closed code, is common enough in published research that I wanted to test it directly rather than take the paper’s numbers on faith. Could I rebuild the finding from the same public sources, and if I could not rebuild all of it, where exactly would it break?

What rebuilt, and what did not

The core metric is simple: life expectancy minus healthy life expectancy. Both series are in the WHO Global Health Observatory’s public API, country by country, back to 2000. Pulling them and taking the difference reproduces the paper’s central object without much difficulty.

The harder pieces are the ones a reader would not notice from the outside. The paper clusters countries by disease burden using PCA and k-means, then checks that clustering with a random forest and a Boruta feature-selection pass. That step needs cause-specific disability data at the country level, and that data does not live in the same API as life expectancy. It sits in a separate WHO system, the Global Health Estimates Results Tool, built for point-and-click use rather than bulk pulls. The paper also fits a spatial error model without stating which geographic adjacency structure it used, and projects the gap out to 2100 without describing the forecasting method. Neither is something I was willing to guess at and call a replication.

So the honest version of this project has two parts: a core metric that rebuilt cleanly, and a disease-burden analysis that is either still in progress or documented as a dead end, depending on when you are reading this. The GitHub repository states which one is currently true.

What the rebuild found

Extending the pull two years past the paper’s 2019 cutoff, to 2021, gives 185 countries with both figures reported. The regional pattern holds up:

Region Median gap (years)
Africa 8.22
Western Pacific 8.57
South-East Asia 9.35
Americas 9.56
Europe 10.06
Eastern Mediterranean 10.22

Africa has the narrowest gap, which matches the paper’s finding, though I would be cautious about reading too much into that agreement. A Kruskal-Wallis test confirms the regions differ (p < 1e-13), and a forward-selection regression keeps both life expectancy and health expenditure as a share of GDP as significant predictors of gap size, together explaining about 82% of the variance. That also lines up directionally with what the paper reports.

Healthspan-lifespan gap by country, …
 
 
Gap = life expectancy minus healthy life expectancy, in years. Click a country for the full breakdown. Gray = no data.
Click a country to see its life expectancy, healthy life expectancy, and the gap between them.

What it does not confirm is precision. WHO and UN estimates get revised retroactively, so even the years the two analyses share are not guaranteed to match number for number. Reproducing the shape of a finding and reproducing its exact values are different claims, and I am only making the first one here.

The regression above treats every country as statistically independent, which is not true of geography. Refitting it as a spatial error model, letting nearby countries’ residuals correlate instead of assuming independence, changes which countries look larger- or smaller-than-predicted for 8 of 183 countries, five of them clustered in Europe and all flipping the same direction. That is not something a single static map communicates well, so toggle between the two below.

Gap deviation, plain regression vs. spatial-adjusted, …
Larger than predicted Smaller than predicted Flips between the two models
"Predicted" = this repo's own gap ~ life expectancy + health spending regression. The spatial-adjusted view lets nearby countries' residuals correlate instead of treating each country as independent. Click a country for both classifications; ringed countries are the ones that disagree.
Click a country to compare its plain-regression and spatial-adjusted classification.

Why this is the kind of check I want to keep doing

I do not think this exercise says anything damning about the original paper. Most published statistical work has code that never makes it into a repository, and most readers never test whether the public parts of a paper’s data actually support what the paper claims. That gap between what a paper reports and what an outside reader can independently confirm is, in its own way, a smaller version of the same problem this site is built around: the distance between a claim and the years of work it would take to actually verify it.

The code, data-pull scripts, and full results are on GitHub, including whatever has been added since this page was last updated.