← Latest papers
📊 statistics

adjustedCurves: Estimating Confounder-Adjusted Survival Curves in R

The paper introduces the `adjustedCurves` R package, which provides a unified framework for estimating and visualizing confounder-adjusted survival curves, restricted mean survival times, and quantiles in observational studies with right-censored time-to-event data.

Original authors: Robin Denz, Nina Timmesfeld

Published 2026-08-19
📖 5 min read🧠 Deep dive

Original authors: Robin Denz, Nina Timmesfeld

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the world of medical research, understanding how long a patient might live after a specific treatment is a fundamental question. When scientists study this, they often look at time-to-event data, which tracks the duration from a starting point, like a surgery, until a specific outcome occurs, such as death or the return of a disease. To visualize these timelines, researchers traditionally draw survival curves. These lines show the percentage of people still alive or free from an event as time passes. If a study is a perfectly controlled experiment where patients are randomly assigned to different treatments, these curves offer a clear and honest picture of cause and effect. However, most medical research happens in the real world, where patients are not randomly assigned. Instead, doctors choose treatments based on a patient's age, severity of illness, or other factors. This creates a hidden trap: if a treatment group happens to be sicker to begin with, their survival curve will look worse, not because the treatment failed, but because the patients were already at higher risk. This distortion is called confounding, and it can make a helpful treatment look deadly or a harmful one look beneficial.

To solve this problem, Robin Denz and Nina Timmesfeld from the Ruhr-University Bochum have developed a new tool for the R programming language, a software environment widely used by statisticians. Their work, packaged as adjustedCurves, provides a way to redraw those survival lines so they reflect what would have happened if the treatment groups had been perfectly balanced, as if the patients had been randomly assigned. The researchers did not invent the mathematical formulas for this adjustment; instead, they gathered many different existing methods from scientific literature and wrapped them into a single, easy-to-use system. Before this tool existed, a researcher might have to learn five different software packages, each with its own confusing set of rules, just to try one method. The new package unifies these approaches, allowing scientists to calculate adjusted curves, estimate confidence intervals, and generate publication-ready graphs with a single command.

The team tested their software using real data from the Rotterdam tumor bank, which contains records of 2,982 women with primary breast cancer. In this dataset, some patients received hormonal therapy while others did not. When the researchers first plotted the raw, unadjusted survival curves, the results were startling and misleading. The women who received hormonal therapy appeared to have a much lower chance of survival than those who did not, with the gap between the two groups widening significantly over time. This seemed to suggest that the therapy was harmful. However, the researchers knew this was an illusion caused by confounding. In reality, doctors tended to prescribe hormonal therapy to patients who were already sicker or had more aggressive tumors. The raw data was simply reflecting the poor health of the treated group, not the effect of the drug.

By applying the methods within the adjustedCurves package, the researchers stripped away the influence of these pre-existing differences. They used statistical techniques to re-weight the data, effectively creating a hypothetical scenario where the treated and untreated groups were identical in terms of age, tumor size, and other risk factors. When they redrew the survival curves using this adjusted data, the dramatic difference vanished. The two lines, representing the treated and untreated groups, ran almost parallel to each other, showing no significant difference in survival outcomes. This result aligned with what other rigorous studies had suggested: the therapy was not the cause of the poor survival seen in the raw data. The package also allowed the team to calculate specific numbers, such as the difference in survival probability after five, six, or seven years, and the median time patients might expect to live. In every case, the adjusted numbers showed that the treatment made no substantial difference to the overall survival time for this specific group of patients.

The paper emphasizes that while the mathematics behind these adjustments are complex, the goal is to make the process accessible to researchers who may not be experts in advanced statistics. The software handles the heavy lifting, checking that the curves behave logically and providing tools to visualize the results clearly. It includes features to show how many patients were still being followed at each point in time and to display the range of uncertainty around the estimates. The authors note that while their tool works well for many common scenarios, it is not a magic bullet for every possible research problem. It currently handles treatments that do not change over time and relies on the assumption that all important risk factors have been measured. If a crucial factor was missed or if the treatment changes during the study, the tool cannot fix the resulting bias.

Ultimately, this work is about clarity and honesty in medical reporting. By providing a way to visualize the true effect of a treatment, free from the noise of pre-existing differences between patient groups, the adjustedCurves package helps prevent misleading conclusions. It ensures that when a doctor or a patient looks at a graph of survival rates, they are seeing the effect of the treatment itself, not the effect of the illness that led to the treatment being chosen in the first place. The researchers hope that by making these sophisticated methods easier to use, more studies will move beyond simple, unadjusted graphs and provide a more accurate picture of how medical interventions truly affect human lives.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →