boot_hr: Bootstrap hazards ratios of two survival models 'boot_hr'...

View source: R/survival_functions.R

boot_hrR Documentation

Bootstrap hazards ratios of two survival models boot_hr computes bootstrap hazard ratios (HR) of two survival models (model 1 vs. 2) or one survival model with multiple treatments (rx 1 vs. 2)

Description

Bootstrap hazards ratios of two survival models boot_hr computes bootstrap hazard ratios (HR) of two survival models (model 1 vs. 2) or one survival model with multiple treatments (rx 1 vs. 2)

Usage

boot_hr(
  surv_model1 = NULL,
  surv_model2 = NULL,
  rx1 = NULL,
  rx2 = NULL,
  rx = F,
  surv_model_rx = NULL,
  times,
  B = 100
)

Arguments

surv_model1

first survival model.

surv_model2

second survival model.

rx1

first treatment arm (if rx = T).

rx2

second treatment arm (if rx = T).

rx

whether to model treatment arms within one model. Default = FALSE.

surv_model_rx

survival model (if rx = T), can only choose weibull or gamma models.

times

time horizon the extrapolation of the survival model is done over.

B

number of bootstrap samples.

Value

dataframe of hazard ratio statistics (2.5% percnetile, median, 97.5% percentile, time points)


DARTH-git/darthtools documentation built on April 3, 2025, 2:12 p.m.