Validate the consistency approximation against literal splitting (Cox)
Source:R/consistency_resample.R
consistency_resample_compare.RdCalls the package's run_single_consistency_split() R_true times and
compares the Monte Carlo rate to the closed-form and multiplier
approximations from consistency_resample(). Survival path only; for the
GLM paths use the standalone GLM validator.
Usage
consistency_resample_compare(
df,
hr.consistency = 1,
R_true = 400L,
draws = 1000L,
multiplier = "rademacher",
tte.name = "Y",
event.name = "Event",
treat.name = "Treat",
cox_init = 0,
adjust_covariates = NULL,
seed = NULL
)Arguments
- df
data.frame/data.table with the relevant outcome columns.
- hr.consistency
Numeric; survival HR consistency threshold (also the default GLM threshold when
consistency_thresholdisNULL). Default 1.0. This isc2, an effect threshold on the half-sample effect –forestsearch()'sconsistency.threshold/hr.consistency. It is not a proportion: the fraction of splits that must clear it ispconsistency.threshold(p*), which this function does not take – it returns the rate rather than thresholding it.- R_true
Integer; number of literal random splits used for the truth.
- draws
Integer; multiplier draws for the Monte Carlo path.
- multiplier
Character;
"rademacher"(default),"normal","poisson".- tte.name, event.name, treat.name
Character; survival/treatment column names.
- cox_init
Numeric; Cox warm-start.
- 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
NULL; adjustment terms.- seed
Integer or
NULL; RNG seed for the Monte Carlo draws.