name: multiplicity-correction
description: Multiple-comparison correction on a Request — the multiplicity block (method, family, alpha), which p-values are corrected together, the per-surface family table and its refusals, precedence, the additive adjusted outputs, row and column geometry on pairwise overlays, and what is never corrected.
type: guide
kind: design
applies_to: process, compose, facet, predict
covers: [multiplicity, p_adjusted, significant_adjusted, family-wise error, false discovery rate, Bonferroni, Holm, Benjamini-Hochberg, correlation matrix p-values]
requires: [capability:multiplicity]
Multiple-comparison correction
Many tests make a lucky hit likely. Name a multiplicity block and Pulse adds corrected p-values BESIDE the raw ones; raw p_value / reject_null never change. No block (or {"method": "none"}) adds nothing.
The block
multiplicity: {method, family, alpha}, every key optional:
method—none,bonferroni,holm(both family-wise error),bh,by(false discovery rate;byunder any dependence). Matches Rp.adjust.family— which p-values correct together (below).alpha— overlay significance level in (0, 1), default0.05. A test’s block refusesalpha(reads its own).
It rides on Request, each tests[] / post_tests[] entry, each overlays[] spec, each correlation matrices[] spec (implies params.inference), each regressions[] spec, the Compose ComposedRequest and its overlay specs, and engine-wide as Options.DefaultMultiplicity. Each key falls through on its own: slot → request → ComposedRequest → engine default → none.
Families
| Family | Pools | Offered on |
|---|---|---|
layer | one overlay layer | overlays (default) |
row / column | one row / column of one layer’s matrix | overlays whose payload is a MATRIX |
request | the request’s tests (one per test × group), post-tests (one per partition), request-family overlays and member regression coefficients | tests and regressions (default), request overlays |
compose | every compose member over all slots and Compose-host layers | inside Compose only |
matrix | one matrix result’s distinct pairs (upper triangle, m = k(k − 1)/2), per bucket | matrix specs (default) |
Refused PULSE_MULTIPLICITY_INVALID (predict too): row / column on a non-matrix kind, compose outside Compose, request on a Compose-host overlay, anything but layer / row / column on a facet overlay, alpha on a test, matrix off a matrix spec, anything but matrix / request on one, a block on a matrix operator without p-values, an unknown or repeated regression coefficients name, a non-none method on a p-value-free regression (REG_BAYES_LINEAR, a custom one lacking a multiplicity slot). An INHERITED family a surface does not offer falls back to its default; only an explicit one is refused. Members of one request / compose family resolving to different methods are PULSE_MULTIPLICITY_CONFLICT. An explicit block on a descriptive overlay is accepted and inert.
Outputs (all additive)
- Test result:
p_adjusted,significant_adjusted(against the test’s ownalpha) andmultiplicity {method, family, alpha, m, excluded};mcounts the defined p-values corrected. - Overlay summary:
p_adjusted/significant_adjustedbesidep_value; the layer adds amultiplicityecho. - Overlay matrix payload: parallel
payload.p_adjusted/significant_adjustedgrids; a panel cell maps element for element. - Pairwise
params.letters:abovefollowssignificant_adjusted(an explicitletters.alphacomparesp_adjustedinstead). - Matrix result:
auxiliary.p_adjusted/significant_adjusted(1 / 0) besideauxiliary.p, mirrored, diagonal null, plus amultiplicityecho. An inherited block reaches only a spec underparams.inference. MAT_SEM: own block only; every estimates row with a p (:=too) joins:sem-defined-parameters.- Regression result:
p_adjusted/significant_adjustedmaps besidep_valuesover its membercoefficients(default every predictor) + echo;alphaas overlays. Only its own block opts it in.margins: own family (margins.multiplicity). - An undefined p (NaN):
p_adjusted: null, nosignificant_adjusted, out ofm, counted inexcluded(absent when 0).
Row and column geometry
row / column make one family per row / column INDEX of the layer’s own matrix, never across rows, columns or layers. A pairwise overlay’s rows are the compared groups, so row corrects each group’s comparisons; a panel cell’s elements join its row / column. The echo adds m_per (sizes aligned with the rows or columns, 0 where no p is defined); m is their sum.
Where it runs
- Process: every arm (streaming, crosstab, join, shard, decode).
- Compose: after all slots, serial = parallel; non-compose families stay per slot,
composepools all; each fan-out target layer is its ownlayer;--streamrows carry no corrections; a failed slot errors the batch. - ProcessChain: per stage, never across stages; whole-chain overlays take no block.
- Facet: each overlay layer alone.
- Extension tests, and extension overlays declaring
EmitsPValues, join like built-ins. - An extension matrix operator joins only if it declares the auxiliary key of its p-values; it then joins under any block (no
params.inference), and its twins are<key>_adjusted/significant_adjusted.
Never corrected
TEST_TUKEY_HSDis already family-wise: an explicit non-noneblock on it is refused, an inherited one skipped, and it never joins a family.- A p-value outside any family stays raw; predict’s
p_values {total, uncorrected, basis, threshold}counts those (a regression: one per non-intercept predictor), anduncorrected≥threshold(10) with no block anywhere raisesPULSE_ADVISORY_MANY_TESTS;basisisexact,dictionary(every dictionary entry assumed a bucket) orlower_bound(predict-advisories).
Choosing
Few planned tests, false positives costly: holm. Screening many cells / pairs: bh. Odd dependence: by. Match the question: row for “does any group differ from the rest”, layer for one table, request / compose for one claim over many tests.
See
statistical-testing · predict-advisories · overlay-system · compose-requests · process-chain · facet-design · request-envelope · response-components · pulse_skills_get glossary (family-wise-error, false-discovery-rate) · pulse_errors_lookup for PULSE_MULTIPLICITY_*.