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()等通用函数对结果进行可视化与汇总。本文详述该包的方法学原理,利用公开数据进行演示,并提供计算指导。