Multiple-Comparison Correction
Run many tests and some will come out significant by luck. A
multiplicity block adds corrected p-values beside the raw ones, so a
reader can tell a real hit from one the number of tests made likely.
Raw p_value / reject_null never change, and a request with no block
(the default) gets no corrected figures.
{
"cohort": {"filename": "experiment.pulse"},
"tests": [
{"type": "TEST_T", "field": "revenue", "split_by": "treatment"},
{"type": "TEST_PROP_Z", "field": "converted", "split_by": "treatment",
"params": {"success": "yes"}}
],
"multiplicity": {"method": "holm"}
}
The block
multiplicity: {method, family, alpha}, every key optional.
| Key | Values | Meaning |
|---|---|---|
method | none, bonferroni, holm, bh, by | the procedure; matches R p.adjust (bh / by are R’s BH / BY) |
family | layer, row, column, request, compose, matrix | which p-values are corrected together |
alpha | a number in (0, 1), default 0.05 | the level an overlay’s significant_adjusted reads (a test uses its own alpha) |
bonferroni and holm control the family-wise error rate (the chance
of any false positive in the family); bh and by control the false
discovery rate (the expected share of false positives among the hits),
by under any dependence. {"method": "none"} is the explicit opt-out.
It rides on the Request, each tests[] / post_tests[] entry, each
overlay spec, each MAT_CORRELATION / MAT_PARTIAL_CORRELATION
matrices[] spec (where it implies params.inference), each
regressions[] spec (with an optional coefficients list), the
ComposedRequest, its overlay specs and its compare entries, and
engine-wide as Options.DefaultMultiplicity. Each key falls through on
its own: slot, request, ComposedRequest, engine default, none.
Families
| Family | Corrects together | Where |
|---|---|---|
layer | one overlay layer | overlays (the overlay default) |
row / column | each row / column of one layer’s matrix | overlays with a MATRIX payload |
request | the request’s tests, post-tests, request-family overlays and member regression coefficients | tests and regressions (their default), request overlays |
compose | every compose member across all slots, Compose-host layers and nested-model comparisons | inside Compose; the only family a compare entry offers (its default) |
matrix | one matrix result’s distinct pairs (the upper triangle: m = k(k − 1)/2 for k members), one family per group bucket | matrix specs (the matrix default; request also offered) |
An inherited family the surface does not offer takes the surface
default; an explicit one is refused (PULSE_MULTIPLICITY_INVALID):
row / column on a non-matrix kind, compose outside Compose,
request on a Compose-host overlay, request / compose on a facet
overlay, matrix anywhere but a matrix spec and anything but matrix /
request on one, and a block on a matrix operator that emits no
p-values. An inherited block corrects only a matrix spec that already
sets params.inference: true. Members of one request / compose family that resolve to
different methods are PULSE_MULTIPLICITY_CONFLICT. alpha on a test’s
own block is refused (the test’s alpha is used), and so is an explicit
correction on Tukey HSD, which is already family-wise and never joins a
family.
A regression joins a family only through its OWN block: a request-level
or engine-default block never reaches a regression without one (its
fields still fill the own block’s empty ones). Its members are the
coefficients its coefficients list names (a predictor or
(intercept); an unknown or repeated name is refused), by default every
predictor that reports a p-value. A named coefficient the fit reports no
p-value for (dropped by selection) stays a member with an undefined p.
REG_BAYES_LINEAR emits no p-values, so a block resolving to any method
but none on it is refused (PULSE_MULTIPLICITY_INVALID, by predict
too).
row and column build one family per row or column index of the
layer’s own matrix, purely by coordinate: a pairwise overlay’s rows are
the compared groups, and every element of a panel cell joins its cell’s
family. Families never cross layers.
Outputs
Present only when a correction ran:
- Tests:
p_adjusted,significant_adjustedandmultiplicity {method, family, alpha, m}besidep_value. - Overlay summaries:
p_adjusted/significant_adjustedbeside the raw figure (p_value, or thestatisticthat the t / z-versus-reference kinds carry their p in). - Overlay matrices: parallel
payload.p_adjusted/payload.significant_adjustedmatrices on identical headers and coordinates; a panel cell’s vector maps element for element. - Overlay layers: a
multiplicityecho, withm_perforrow/column(each family’s size, aligned with the rows or columns). - Pairwise significance letters: a pairwise overlay with
params.lettersrecomputes itspayload.parts.lettersafter the correction, so each cell’sabovefollowssignificant_adjusted(an explicitletters.alphacomparesp_adjustedagainst that alpha instead). - Correlation matrices:
auxiliary.p_adjustedandauxiliary.significant_adjusted(1below the block’salpha, else0) besideauxiliary.p, in its encoding, mirrored into both triangles with a null diagonal, plus amultiplicityecho on the matrix result. - Regressions:
p_adjusted(a map keyed likep_values, one entry per member coefficient) andsignificant_adjusted(against the block’salpha, 0.05 by default) besidep_values, plus amultiplicityecho on the regression result. A regression with amarginsblock corrects its marginal effects as a family of their own, one per regression (one p-value per term; familymargins, never pooled intorequestorcompose), so addingmarginsnever moves a coefficient’sp_adjusted:margins.p_adjusted/margins.significant_adjustedbesidemargins.p_values, plus amargins.multiplicityecho (family: "margins",mthe terms).marginsis an echo-only family: a block naming it isPULSE_MULTIPLICITY_INVALID. - Nested-model comparisons (
ComposedRequest.compare): one hypothesis each, inheriting like a test (own block → theComposedRequest’s → engine default), in the batch’scomposefamily:p_adjusted/significant_adjusted(against the resolvedalpha) besidep_value, plus amultiplicityecho. A comparison that failed on its data joins no family.
m is the number of defined p-values corrected together. An undefined
(NaN) p is left out of m and shows p_adjusted: null. Field shapes:
Payload JSON Schema.
Where it runs
- Process: every arm (serial, streaming, fused or buffered crosstab, join, shard, parallel decode) corrects in one place after the result is built.
- Compose: after all slots and Compose-host overlays finish. Serial
and
ComposeParallelagree byte for byte;--streamemits slot rows only, with no corrections; a failed slot aborts before the fold. - ProcessChain: each stage corrects its own request; no family spans stages, and the whole-chain overlays take no block.
- Facet: each overlay layer corrects on its own.
Predict
Predict (Pulse.Predict, pulse api predict, pulse_predict) applies the same rules to a request without running it
and reports p_values {total, uncorrected, basis, threshold}: how many
inferential p-values the request emits (a REG_OLS / REG_GLM
regression counts one per non-intercept predictor, none on an l1 /
elasticnet fit without resample, whose p-values are null, plus one
per margins term) and how
many no block reaches.
threshold is 10 (descriptor.MultiplicityTriggerThreshold); an
uncorrected count at or above it is the cue to add a block. basis is
exact, dictionary (assumes every dictionary entry of a category axis
becomes a bucket, so it can over- or under-count) or lower_bound (an
axis it cannot size counts as one). Request predict reports it; facet
predict counts its inferential overlays (one p-value each) and compose
predict counts its own overlays, always as a lower_bound, beside each
slot’s advisories. Chain predict reports none.
Feature profiles
The block is the feature capability:multiplicity. On an instance that
hides it, the key is refused as an unknown field, it is absent from the
payload schema, and predict omits p_values. See
Feature Profiles.
Not corrected
A p-value no block claims stays raw. An extension TEST_*
joins families like a built-in
(Extension Points).