Observational studies are often conducted to estimate causal effects of treatments or exposures on event-time outcomes. Since treatments are not randomized in observational studies, techniques from causal inference are required to adjust for confounding. Bayesian approaches to causal estimates are desirable because they provide 1) prior smoothing provides useful regularization of causal effect estimates, 2) flexible models that are robust to misspecification, 3) full inference (i.e. both point and uncertainty estimates) for causal estimands. However, Bayesian causal inference is difficult to implement manually and there is a lack of user-friendly software, presenting a significant barrier to wide-spread use. We address this gap by developing causalBETA (Bayesian Event Time Analysis) - an open-source R package for estimating causal effects on event-time outcomes using Bayesian semiparametric models. The package provides a familiar front-end to users, with syntax identical to existing survival analysis R packages such as survival. At the same time, it back-ends to Stan - a popular platform for Bayesian modeling and high performance statistical computing - for efficient posterior computation. To improve user experience, the package is built using customized S3 class objects and methods to facilitate visualizations and summaries of results using familiar generic functions like plot() and summary(). In this paper, we provide the methodological details of the package, a demonstration using publicly-available data, and computational guidance.
翻译:观察性研究常用于估计治疗或暴露对事件时间结果的因果效应。由于观察性研究中治疗分配并非随机化,需要采用因果推断技术来调整混杂偏倚。贝叶斯方法在因果估计中具有以下优势:1)先验平滑可为因果效应估计提供有效正则化;2)灵活模型对模型设定错误具有稳健性;3)可对因果估计量进行完整推断(即同时提供点估计与不确定性估计)。然而,贝叶斯因果推断的手动实现较为困难,且缺乏用户友好型软件工具,这成为广泛应用的重要障碍。为填补这一空白,我们开发了causalBETA(贝叶斯事件时间分析)——一个基于贝叶斯半参数模型估计事件时间结果因果效应的开源R包。该包为用户提供熟悉的操作界面,其语法与现有生存分析R包(如survival)保持一致;同时后端集成Stan——一个用于贝叶斯建模与高性能统计计算的流行平台——以实现高效后验计算。为提升用户体验,该包采用定制的S3类对象与方法构建,支持通过plot()和summary()等通用函数进行结果可视化与汇总。本文详细阐述了该包的方法学原理,通过公开数据进行了演示,并提供了计算指导。