View source: R/subgroup_consistency_helpers.R
| get_split_hr_fast | R Documentation |
Fits a minimal Cox model to estimate hazard ratio with reduced overhead. Disables robust variance, model matrix storage, and other extras for speed.
get_split_hr_fast(df, cox_init = 0, adjust_covariates = NULL)
df |
data.frame or data.table with Y, Event, Treat columns. |
cox_init |
Numeric. Initial value for coefficient (default 0).
Ignored when |
adjust_covariates |
This option is implemented but has not been
tested against the manuscript analyses or the simulation studies of
León and Anderson (2026a, 2026b), which use the unadjusted
treatment-only fits.
Character vector or |
Numeric. Estimated hazard ratio for Treat, or NA if model fails.
set.seed(42)
df <- data.frame(
Y = rexp(80),
Event = rbinom(80, 1, 0.6),
Treat = rep(0:1, 40)
)
get_split_hr_fast(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.