Background: Time-to-event data with multiple time scales are observed in many epidemiological and clinical studies. While models that allow for simultaneous consideration of multiple time scales for the hazard of an event have been proposed, their use is still not wide-spread in applied research. One reason for this might be the lack of convenient statistical software to estimate such models. Here we introduce the R-package TwoTimeScales. The package provides tools to estimate models for hazards that vary smoothly over two time scales, including proportional hazards models with such a two-dimensional baseline hazard. Extensions to competing risks models are implemented as well. Methodology is based on two-dimensional smoothing with P-splines. Results: We demonstrate the features of the R-package by analysing a freely available dataset containing post-surgery follow-up data on patients with breast cancer. We present two examples, a proportional hazards regression and a competing risks problem. Besides estimation, we illustrate the plotting utilities of the package. Conclusion: The R-package TwoTimeScales can be easily used to fit flexible hazard models with two time scales, allowing new perspectives in the analysis of time-to-event data with multiple time scales.
翻译:背景:在众多流行病学和临床研究中,可观察到具有多个时间尺度的时间-事件数据。尽管已有允许同时考虑多个时间尺度的事件风险模型被提出,但其在应用研究中的使用仍不广泛。原因之一可能是缺乏便捷的统计软件来估计此类模型。本文介绍R软件包TwoTimeScales。该软件包提供工具,用于估计在两个时间尺度上平滑变化的风险模型,包括具有此类二维基线风险的比例风险模型。同时也实现了对竞争风险模型的扩展。方法学基于使用P样条的二维平滑技术。结果:我们通过分析一个包含乳腺癌患者术后随访数据的公开可用数据集,展示该R软件包的功能。我们呈现了两个示例:一个比例风险回归问题和一个竞争风险问题。除参数估计外,我们还演示了该软件包的绘图功能。结论:R软件包TwoTimeScales可便捷地拟合具有双时间尺度的灵活风险模型,为分析多时间尺度的时间-事件数据提供了新的视角。