ah1: Average Hazard (one sample)

View source: R/ah1.R

ah1R Documentation

Average Hazard (one sample)

Description

Calculates the average hazard with survival weight and the corresponding asymptotic confidence interval for a single sample.

Usage

ah1(time, status, tau, conf.int=0.95)

Arguments

time

A numeric vector of follow-up times for right-censored data.

status

A numeric vector indicating the event status; 1 = event occurred, 0 = right censored.

tau

A scalar specifying the end time point (tau) for calculating the average hazard. If tau = NULL, the default is the maximum time point at which the risk set size in both groups is at least 10.

conf.int

A numeric value specifying the confidence level for confidence intervals. The default is 0.95.

Details

It also provides the log-transformed t-year event rate and restricted mean survival time (RMST) along with their variances as intermediate products. Note that the confidence intervals for the t-year event rate and RMST are based on log-scale values. As a result, the confidence intervals may differ slightly from those generated by the surv2sampleComp or survRM2 packages.

Value

An object of class ah1, which contains the following components:

need_stop

Logical indicator. If TRUE, specify another tau. The survival probability at the specified tau needs to be > 0.

tau

The truncation time point used in the analysis.

result1

Estimated average hazard.

Author(s)

Hajime Uno, Miki Horiguchi

References

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;1-17. <doi:10.1002/sim.9651>

Examples

#====================================================================
# cm214_pfs: The sample reconstructed data of the CheckMate214 study.
# The code below reproduces the results reported by
# Uno and Horiguchi (StatMed; 2023) in Table 6.
#====================================================================
D      = cm214_pfs
time   = D$time
status = D$status
tau    = 21

b = ah1(time=time, status=status, tau=tau, conf.int=0.95)
print(b)

survAH documentation built on Dec. 4, 2025, 5:07 p.m.