The survAHtools package provides tools to support the design and analysis of randomized clinical trials (RCTs) that use the average hazard (AH) with survival weight, in which the treatment effect is summarized by the difference or ratio of the AHs between the two groups. It addresses two key aspects of implementing AH-based methods: (1) design considerations when the AH-based analysis is used for the primary analysis, and (2) tools for identifying the appropriate timing of the analysis.
For the design (1), n2power() calculates the statistical power for a given
accrual configuration, and power2n() determines the accrual configuration and
sample size required to achieve a target power. For the timing of the analysis (2), ana_timing()
assesses whether enough information has accumulated to trigger the final
analysis based on accumulating blinded trial data.
To install the package from the CRAN:
install.packages("survAHtools")To install the latest development version:
devtools::install_github("uno1lab/survAHtools")Please see the package vignette on the website: https://www.uno1lab.com/survAHtools/articles/vignette-survAHtools.html
Uno H and Horiguchi M. Ratio and difference of average hazard with survival weight: new measures to quantify survival benefit of new therapy. Statistics in Medicine. 2023;42(7):936-952. https://doi.org/10.1002/sim.9651
Horiguchi M, Tian L, Hattori S, Uno H. Design and Analysis of Randomized Clinical Trials With Average Hazard: Practical Guidance and Tools for Implementation. Statistics in Medicine. 2026;45:e70624. https://doi.org/10.1002/sim.70624