Compute bootstrap percentile confidence interval for the log hazard ratio
Source:R/single-event.R
get_boot_pci_se.RdCompute bootstrap percentile confidence interval for the log hazard ratio
Arguments
- data
A data frame with a column
log_hrcontaining bootstrap log hazard ratio estimates, as returned by multiple calls toget_ipcw_cox_fit_se()orget_cox_fit_se().
Value
A named numeric vector of length 2 giving the 2.5th and 97.5th percentiles of the bootstrap distribution.
Examples
boot_results <- data.frame(log_hr = rnorm(500, mean = -0.5, sd = 0.2))
get_boot_pci_se(boot_results)
#> 2.5% 97.5%
#> -0.92922493 -0.09525084