Implementation of Bonferroni, Holm-Bonferroni and Benjamini-Hochberg FDR corrections declared in sts_correction.h. More...
#include "sts_correction.h"#include <algorithm>#include <numeric>#include <vector>#include <cmath>
Go to the source code of this file.
Implementation of Bonferroni, Holm-Bonferroni and Benjamini-Hochberg FDR corrections declared in sts_correction.h.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Bonferroni is a constant rescale by n followed by a cwiseMin(1). Holm-Bonferroni flattens the p-value matrix, sorts ascending and walks the ranks computing \(p^*_{(i)} = (n-i+1)\, p_{(i)}\) with the cumulative-maximum enforcement that keeps the sequence monotone; results are then scattered back to the original (channel, time) layout. Benjamini-Hochberg FDR uses the conjugate step-up recursion \(p^*_{(i)} = \min_{k\ge i} \tfrac{n}{k}\, p_{(k)}\), capped at 1.
Definition in file sts_correction.cpp.