Combines one or more hr objects into a single summary table of hazard ratios and confidence intervals. Each object is processed independently: bootstrap objects receive bootstrap-based CIs while non-bootstrap objects retain model-based CIs. All input objects must have unique analysis labels.

hr_data(..., alpha = 0.05, ic = FALSE, boot_method = "log-normal")

Arguments

...

Objects that inherit class hr, as produced by estimate_ipwhr(), or a single list of such objects. Supports splicing and unquoting as supported by rlang::list2.

alpha

The desired nominal significance level of the confidence intervals. Default is 0.05.

ic

Logical. If TRUE, forces model-based (robust Wald) confidence intervals from survival::summary.coxph() even when bootstrap replicates are available. Default is FALSE.

boot_method

Character string specifying the bootstrap CI method. One of "normal", "log-normal", "percentile", or "basic". Default is "log-normal". Only used when bootstrap replicates are present and ic = FALSE.

Value

A tibble::tibble with one row per treatment subgroup per analysis containing the following columns. When bootstrap replicates are present and ic = FALSE, confidence interval bounds are computed via compute_bootstrap_ci using the method specified by boot_method and truncated to the support of the hazard ratio, so that the lower bound is never below 0 (the "normal" and "basic" methods can otherwise produce a negative lower bound).

  • analysis the label provided to estimate_ipwhr()

  • n the number of trials per treatment group

  • events the number of events per treatment group

  • group_label the treatment group label

  • hr the hazard ratio relative to the reference group

  • hr_lcl the lower confidence bound for the hazard ratio

  • hr_ucl the upper confidence bound for the hazard ratio

Author

Brendan Brown