Table of Contents
Fetching ...

TwoTimeScales: An R-package for Smoothing Hazards with Two Time Scales

Angela Carollo, Paul H. C. Eilers, Hein Putter, Jutta Gampe

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.

TwoTimeScales: An R-package for Smoothing Hazards with Two Time Scales

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.
Paper Structure (1 section, 3 equations, 6 figures, 1 table)

This paper contains 1 section, 3 equations, 6 figures, 1 table.

Table of Contents

  1. Appendix

Figures (6)

  • Figure 1: Multistate model of the rotterdam breast cancer data.
  • Figure 2: Flowchart illustrating the workflow of TwoTimeScales. R-objects, indicated by their class when appropriate, are in ovals, while functions are in rectangles. Functions to extend the analysis to a competing risks model are enclosed within the dashed box.
  • Figure 3: Baseline hazard of death in the breast cancer data, represented on the $(u,s)$-plane (left) and on associated SE surface (right).
  • Figure 4: Left: Mortality rates after surgery, for grade 3 breast cancer, over time since surgery and selected ages at surgery. Right: Mortality rate after surgery for a woman with breast cancer grade 3 who had surgery at age 50, with CIs.
  • Figure 5: Cumulative incidence functions of recurrence (left panel) and death before recurrence (right panel) by age at surgery and time since surgery.
  • ...and 1 more figures