🤖 AI Summary
This study addresses the lack of accessible modeling tools for time-to-event data observed on dual time scales by introducing an R package that offers the first open-source, user-friendly solution for fitting smoothly varying baseline hazard functions across two temporal dimensions. Built upon two-dimensional P-spline smoothing, the proposed method seamlessly integrates with both proportional hazards models and their competing risks extensions, enabling flexible modeling and efficient parameter estimation. The utility of the approach is demonstrated through an application to postoperative breast cancer follow-up data, where it effectively enhances risk estimation and visualization. This work substantially advances the practical capabilities of multi-time-scale survival analysis, making sophisticated modeling more accessible to applied researchers.
📝 Abstract
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.