IPDfromKM: how it works, and a faster alternative
IPDfromKM is a free R package and Shiny app (Liu, Zhou and Lee, 2021) that reconstructs individual patient data from Kaplan–Meier curves with a modified Guyot algorithm. You supply the curve coordinates and the numbers at risk; it returns the IPD, re-plotted curves, a hazard ratio and accuracy checks. It is peer-reviewed and reliable, but every figure is manual work.
The IPDfromKM workflow
- Extract the coordinates of each curve: click points on the image (the package can read clicks on a figure) or use a digitizer such as WebPlotDigitizer.
- Type the numbers-at-risk table and the total number of patients.
- Pre-process the points (
preprocess) and reconstruct each arm (getIPD). - Check the result: the package compares the reconstructed and digitised curves and reports the hazard ratio.
IPDfromKM or TrialCurve?
| IPDfromKM | TrialCurve | |
|---|---|---|
| Getting the curve | Click points by hand | Read from the image automatically |
| Numbers-at-risk table | Typed in | Read automatically |
| Multi-panel figures | One curve at a time | Every panel at once |
| Checks against the paper | Your own | Printed HRs and medians, automatically |
| Time per figure | 20–60 minutes | About a minute |
| Cost | Free, open source | 3 free figures a month, then per figure |
Use IPDfromKM for occasional figures, for teaching, or when you want to control every point. Use TrialCurve when you have many figures, multi-panel layouts or a deadline, or need an audit trail for an HTA dossier. Many teams use both, with one as a check on the other.
Accuracy
Both rest on the Guyot method, so a careful manual digitisation and an automated one reach similar accuracy. On figures from 40 published trials, TrialCurve reproduced 95% of printed hazard ratios within 10% (methods and results).
FAQ
Is IPDfromKM free?
Yes. It is an open-source R package on CRAN with an accompanying Shiny app.
What is the difference between IPDfromKM and the Guyot algorithm?
IPDfromKM implements a modified version of the Guyot (2012) algorithm, with pre-processing of the digitised points and built-in accuracy checks.
Can TrialCurve output data for use in R?
Yes. It returns the reconstructed IPD as CSV (arm, time, event), ready for survival, flexsurv or other R packages.
Reconstruct IPD from your own figure. Upload a Kaplan–Meier plot and get curves, numbers at risk, pseudo-IPD, hazard ratios and a validation pack. Three figures a month are free.
Try the live demo Browse trial data API docs