Reconstruct patient-level data from a Kaplan-Meier curve

A meta-analysis of survival often needs each trial's patient-level data, and papers print only the curve. The usual way back is to digitize the curve by hand and run a reconstruction script. Here the paper's PDF goes in and the patients come out.

Drop in a graph or a PDF

What you get

How it works

A Kaplan-Meier curve drops, at each event time, by the share of those still at risk who had the event. With the numbers at risk printed under the curve, that fixes how many events there were at each drop and how many patients were censored between two printed numbers. The method is that of Guyot, Ades, Ouwens and Welton (BMC Medical Research Methodology, 2012).

A curve drawn inside a PDF is read exactly, so each drop is known to be a whole number of events. That is used to place the censored patients, where a curve digitized by hand can only spread them evenly.

How close it is

On 300 survival charts drawn from patients we simulated and read back from the PDF, the rebuilt data had the right number of patients in all 644 groups and exactly the right number of events in 627 of them (within one in 639). The hazard ratio between two groups came out within 2% of the true one on 247 of 251 charts, and within 5% on 250.

These are curves we drew ourselves from patients we know, which is the only way to mark the answer right or wrong. Figures in journals vary more. Check the rebuilt medians and event counts against the ones the paper reports.

Steps

  1. Upload the paper's PDF. The curve and its number-at-risk table are read free.
  2. Enter a Review pass code.
  3. Download Excel: each survival curve has a patients sheet beside it.

Limits

It needs the number-at-risk table. Without it the number of patients is not known.

It works from PDFs, where the curve is exact. From a picture the curve is read and can be downloaded, but patients are not rebuilt from it.

The rebuilt rows are a reconstruction. Analyses run on them come out close to the published ones; no row is a real person.

Questions

What does it cost?

Reading the curve and the table is free. The rebuilt patient-level data comes with the Review pass: $39 for 30 days, paid once, with no account.

Which method is used?

The algorithm of Guyot and colleagues (2012), which is also what the common R packages for this use. The difference is the input: the curve comes exactly from the PDF and is not clicked by hand.

Can I use the output in R or Stata?

Yes. The patients sheet is a plain table of group, time and event, which survival packages read directly.

Related