fit
|
A survatr_fit.
|
interventions
|
A named list of causatr_intervention objects (causatr::static(), causatr::shift(), causatr::scale_by(), causatr::threshold(), causatr::dynamic()). The element names are carried through to the intervention column of the result.
|
times
|
Numeric vector of time points at which to evaluate the survival curve. Must all be elements of fit$time_grid — extrapolation beyond the observed grid is rejected with survatr_time_extrapolation.
|
type
|
Estimand. For a single-event fit: one of “survival”, “risk”, “risk_difference”, “risk_ratio”, “rmst”, “rmst_difference” (default “risk_difference”). For a competing-risks fit (surv_fit(…, competing = )): one of “cif” (per-cause cumulative incidence), “cif_difference”, “cif_ratio” (default), or all-cause “survival” / “risk” (from the summed cause-specific hazards). Mixing a CIF estimand with a single-event fit (or vice versa) aborts with survatr_competing_type.
|
cause
|
Competing-risks only. Integer vector selecting which cause(s) to report for the cif estimands, or NULL (the default) for all causes. Validated against the fitted causes; ignored for survival / risk and for single-event fits.
|
reference
|
Name of the intervention used as the reference in difference / ratio contrasts. Defaults to the first name in interventions. Ignored by type = “survival”, “risk”, “rmst”, and “cif” (no pairwise contrast).
|
ci_method
|
One of “none” (point estimates only), “sandwich” (delta-method cross-time IF aggregation via causatr:::prepare_model_if()), or “bootstrap” (resample individuals, refit the hazard model per replicate, percentile or Wald CIs). Default “none”.
|
conf_level
|
Confidence level for the CIs when ci_method != “none”. Numeric scalar in (0, 1), default 0.95.
|
n_boot
|
Integer; number of bootstrap replicates. Ignored when ci_method != “bootstrap”. Default 500L.
|
boot_ci
|
One of “percentile” (sample-quantile CI) or “wald” (point estimate +/- z * sd(replicates)). Default “percentile”. Percentile is transform-invariant and is the safer default for ratios / RMST.
|
parallel
|
One of “no”, “multicore”, “snow”; forwarded to boot::boot(). Default “no”.
|
ncpus
|
Integer; number of CPUs for parallel bootstrap. Default 1L.
|
seed
|
Integer scalar or NULL. When non-null, set.seed(seed) is called before the bootstrap loop so the replicate sequence is reproducible. Default NULL.
|
…
|
Unused; reserved for future chunks.
|