ahr_from_km {bonsaiforest} | R Documentation |
Average Hazard Estimation based on Kaplan-Meier Estimates
Description
Average Hazard Estimation based on Kaplan-Meier Estimates
Usage
ahr_from_km(resp, trt, data, status, t_quantile = 0.99)
Arguments
resp |
( |
trt |
( |
data |
( |
status |
( |
t_quantile |
( |
Details
Estimates can be unstable due to the variability of the Kaplan-Meier estimates
in the tails. The t_quantile
argument can address this, e.g. by setting it to
0.95, the 5% highest times will be discarded. By default, the 1% highest times
are discarded.
Value
The estimated average hazard ratio of the treatment (second level of trt
)
versus the control (first level of trt
).
Examples
ahr_from_km("tt_pfs", "arm", example_data, "ev_pfs")
ahr_from_km("tt_pfs", "arm", example_data, "ev_pfs", t_quantile = 0.95)