name: op-reg-mod-resample
description: Spec-level resampling modifier (jackknife — leave-one-out, grouped or by cluster — / bootstrap) that composes with an OLS, GLM, multinomial or model-regression fit; replaces analytical std errors with empirical estimates. Non-empty value forces the buffered path.
kind: operator
category: REG
operator: REG_RESAMPLE
type: reference
applies_to: process, compose, predict
examples_tags: [regression, resampling, jackknife, buffered-pipeline]
Overwrites std_errors / p_values in regressions[i]; the point estimate stays the full-data fit.
Params
Flat keys on the host spec. A wrapper, not a fit: the host refits per replicate (leave-one-out n, delete-a-group g, bootstrap bootstrap_iters).
| Name | Type | Default | Description |
|---|---|---|---|
resample | enum | — | "", jackknife, bootstrap (non-parametric). |
bootstrap_iters | int | 1000 | Bootstrap replicates, used as given (<= 0 → 1000). |
jackknife_groups | int | — | Jackknife only: delete-a-group over g seeded random groups (2 ≤ g ≤ fitted rows, sizes within one). Absent = leave-one-out. |
jackknife_by | field | — | Jackknife only: delete-a-cluster, one replicate per distinct value (≥ 2); a null or non-finite value drops the row. Exclusive with jackknife_groups (PROCESSING_CONFIG). |
rng_seed | int | — | Seeds the bootstrap and the jackknife_groups draw. |
Inputs
Inherits target / predictors from an OLS, GLM (any penalty) or model host (REG_ORDINAL keeps the full fit’s levels), or REG_MULTINOMIAL (keeps its categories; any penalty); the Bayesian fit refuses it.
Output
std_errors[name]— jackknife√((g−1)/g · Σ(β₍ₖ₎ − β̄)²)over itsgreplicates (leave-one-out:g= the fitted rows; a row the fit drops is no replicate); bootstrap sample std of replicates.- NB re-estimates θ per replicate;
theta_std_erris θ̂’s replicate SE. - A delete-a-group jackknife echoes
jackknife_groups(g; the distinctjackknife_byvalues); leave-one-out omits it. p_values[name]— jackknife pivotal; bootstrap percentile-method two-sided.resampleechoes back;coefficientsunchanged;marginsare re-estimated per replicate (regression-margins). Underl1/elasticnetit supplies the null SE / p (penalized refits) and silencesPULSE_ADVISORY_PENALIZED_INFERENCE_UNDEFINED.- Bootstrap echoes
bootstrap_requestedandbootstrap_succeeded(SE / p / vcov use only successes). A failed refit is skipped (succeeded < requested: unstable fit); under 10 successes isPROCESSING_REGRESSION_NO_CONVERGE.
Gotchas
- Forces buffered (predict reports it).
- Leave-one-out costs n²:
PULSE_ADVISORY_JACKKNIFE_COSTat ≥ 10,000 records; usejackknife_groupsorjackknife_by. - Every jackknife replicate must refit: one failure (e.g. separation) fails the slot with that refit’s code,
details.jackknife_groupnaming it.gabove the fitted rows, or one cluster, isPROCESSING_REGRESSION_INSUFFICIENT_DATA. - Wraps a
selection’s selected-feature fit. rng_seed: 0is deterministic but cohort-dependent (paramskey order,vcov,marginsnever move it); pin non-zero across cohorts.- Jackknife is weighted (JK1); bootstrap under a weight →
PULSE_WEIGHT_UNSUPPORTED.
See
pulse_examples_search tags=[jackknife]- Skills:
regression-modeling,op-reg-ols,op-reg-glm,op-reg-mod-selection