Average Hazard (one sample)
ah1.Rd
Calculates the average hazard with survival weight and the corresponding asymptotic confidence interval for a single sample.
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. Iftau = 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
.
Value
An object of class ah1
, which contains the following components:
- need_stop
Logical indicator. If
TRUE
, specify anothertau
. The survival probability at the specifiedtau
needs to be > 0.- tau
The truncation time point used in the analysis.
- result1
Estimated average hazard.
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.
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)
#> $need_stop
#> [1] FALSE
#>
#> $tau
#> [1] 21
#>
#> $result1
#> log(Est) SE(log(Est)) log(low_95) log(upp_95) Est
#> F(tau) -0.4215057 0.03017022 -0.4806382 -0.3623731 0.65605827
#> RMST(tau) 2.4576935 0.02548380 2.4077462 2.5076408 11.67784538
#> AH(tau) -2.8791992 0.05286051 -2.9828039 -2.7755945 0.05617974
#> low_95 upp_95
#> F(tau) 0.61838860 0.69602261
#> RMST(tau) 11.10889522 12.27593472
#> AH(tau) 0.05065062 0.06231242
#>
#> attr(,"class")
#> [1] "ah1"
#> attr(,"v_F")
#> [1] 0.770975
#> attr(,"v_R")
#> [1] 0.5500622
#> attr(,"v_Q")
#> [1] 2.366716
#> attr(,"v_U")
#> [1] 0.007469741