Kaplan-Meier curves stratified by treatment allocation are the most popular way to depict causal effects in studies with right-censored time-to-event endpoints. If the treatment is randomly assigned and the sample size of the study is adequate, this method produces unbiased estimates of the population-averaged counterfactual survival curves. However, in the presence of confounding, this is no longer the case. Instead, specific methods that allow adjustment for confounding must be used. We present the adjustedCurves R package, which can be used to estimate and plot these confounder-adjusted survival curves using a variety of methods from the literature. It provides a convenient wrapper around existing R packages on the topic and adds additional methods and functionality on top of it, uniting the sometimes vastly different methods under one consistent framework. Among the additional features are the estimation of confidence intervals, confounder-adjusted restricted mean survival times and confounder-adjusted survival time quantiles. After giving a brief overview of the implemented methods, we illustrate the package using publicly available data from an observational study including 2982 breast cancer.
翻译:按治疗分配分层的Kaplan-Meier曲线是展示右删失时间至事件终点研究中因果效应最常用的方法。若治疗为随机分配且研究样本量充足,该方法可对总体平均反事实生存曲线产生无偏估计。然而,在存在混杂因素时,这一结论不再成立。此时必须采用允许调整混杂因素的特定方法。我们介绍了adjustedCurves R包,该工具可通过文献中的多种方法估计并绘制这些协变量调整后的生存曲线。它为此主题提供了现有R包的便捷封装接口,并在其基础上增加了额外方法与功能,将有时差异显著的方法统一至一致框架下。附加功能包括置信区间估计、协变量调整后限制平均生存时间及协变量调整后生存时间分位数计算。在简要概述所实现方法后,我们利用一项包含2982例乳腺癌患者的观察性研究公开数据对该包进行演示。