Reconstruct individual patient data from published Kaplan–Meier curves
Short answer: you can recover a close approximation of the patient data behind a published Kaplan–Meier curve. Digitise the curve, read the numbers-at-risk table and run the Guyot (2012) algorithm, which solves for the events and censorings that reproduce both. The resulting pseudo-IPD supports Cox models, parametric fits, network meta-analysis and MAIC.
What happens to your figure
- Read the whole figure. Every panel, curve, at-risk table and printed statistic. API and validation packs zoom in where the text is small.
- Cross-check the curves. Pixel tracing checks each survival curve where it can and flags disagreement.
- Reconstruct IPD. The Guyot (2012) method rebuilds patient-level data: hazard ratios with CIs, medians, RMST, CSV export.
- Check against printed numbers. The result is compared with printed hazard ratios and medians. On the API and validation packs, a failed check triggers a second, more thorough reading.
By hand or with TrialCurve
| By hand | TrialCurve | |
|---|---|---|
| Time per figure | About 20–60 minutes (our estimate) | About a minute |
| Multi-panel figures | One panel at a time | Every panel at once |
| Numbers-at-risk table | Typed in by hand | Read automatically |
| IPD, HRs, medians, RMST | Separate R scripts | In one response |
| Checked against printed numbers | If there's time | Whenever the figure has them |
| Accuracy | Good, done carefully | Same size of error: 2.9% vs 2.9% in a published validation of the standard tools (different figures, no head-to-head; how we measure) |
What you get back
- Digitised curves for every arm, in every panel.
- The numbers-at-risk table, read cell by cell.
- Pseudo-IPD as one row per reconstructed patient (
panel, endpoint, population, arm, time, event), ready forsurvival,flexsurv,multinmaor Stata'sstcox. - Summary statistics: N, events, median survival, survival at landmarks, RMST, Cox hazard ratio with 95% CI and log-rank p.
Every result shows how it was checked
- Curve cross-check: pixel tracing against the model's reading, where tracing succeeds. It does not replace the second person Cochrane asks for.
- Checks against printed numbers: hazard ratios, medians and events, with a fixed 10% tolerance.
- At-risk check: on survival panels, flags a count that rises or sits above the curve.
- Overlay and provenance: overlay where pixel calibration succeeded, otherwise a redraw; image hash, engine and model versions.
- AI-use disclosure ready to paste, as the EU HTA AI principles expect.
How the reconstruction works
The Guyot algorithm treats the digitised curve as a series of step points and the at-risk table as fixed totals at the start of each interval. Within each interval it estimates how many patients were censored so that the implied number at risk at the next table time matches the published count. It assumes censoring is spread evenly within the interval. It then assigns events at each step so that the Kaplan–Meier estimate matches the curve's drop. The final interval uses the average censoring rate, or the total number of events if the paper reports it. See our explainer of the Guyot algorithm for a worked example and code.
How accurate is it?
On 211 printed hazard ratios from papers not used in development, 97% were reproduced within 10% and 88% within 5%. Mean absolute difference 2.9%, the same as a recent validation of the standard tools (Kim 2025: 2.9%). That is our own benchmark, not peer reviewed. Its readings zoomed in and ran in Claude Code, not through the API; a free upload is a quicker reading without zoom.
When reconstruction is less reliable
- No numbers-at-risk table. Pass N per arm, and total events if reported. Expect wider error in the tail.
- Crossing curves of the same colour, heavy compression or tiny screenshots. Check the overlay and the quality grade.
- Heavy censoring between table times, where the even-censoring assumption is strained.
Using pseudo-IPD downstream
Common uses include survival extrapolation for cost-effectiveness models (NICE DSU TSD 14, TSD 21), checking proportional hazards, network meta-analysis of time-to-event outcomes, and unanchored or anchored MAIC (TSD 18). To pool several trials, see meta-analysis with reconstructed IPD. The HTA guide covers what to report.
FAQ
Is reconstructed IPD the same as the trial's real IPD?
No. It is a pseudo-dataset that reproduces the published KM curve and at-risk table. Summary statistics derived from it (HR, medians, RMST) are typically close to the published values, but individual rows are not real patients.
Do I need the numbers-at-risk table?
It is strongly recommended. Without it, the Guyot algorithm can only use the initial N (and total events if reported), and censoring patterns, especially in the tail, are much less certain.
Which software can read the output?
The CSV has one row per patient (panel, endpoint, population, arm, time, event). It loads directly into R (survival, flexsurv, survminer, multinma), Stata (stset/stcox), SAS (PROC PHREG/LIFETEST) and Python (lifelines).
Whole review to do? $49 a figure, checked by a person.
See the validation pack