Multiple Testing Class
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.2
public static class MultipleTesting
- Inheritance
- Object → MultipleTesting
Remarks
When conducting multiple hypothesis tests simultaneously, the probability of making at least one Type I error (false positive) increases with the number of tests. P-value adjustments help control this error inflation to maintain statistical validity.
This class includes two main types of correction methods:
- Family-wise error rate (FWER) controlling methods: Bonferroni, Sidak, Holm, Hochberg, and Hommel. These methods control the probability of making at least one false positive across all tests.
- False discovery rate (FDR) controlling methods: Benjamini-Hochberg and Benjamini-Yekutieli. These methods control the expected proportion of false positives among rejected hypotheses.
FWER methods like Bonferroni and Sidak are generally valid for independent tests, while Holm's procedure is valid regardless of dependencies. For large numbers of tests, FDR methods typically provide better statistical power at the cost of allowing a small proportion of false positives.
The choice of adjustment method depends on the specific research context, the number of tests being performed, and whether controlling false positives or statistical power is more important for the analysis.
Example
// Sample p-values from multiple tests
var pValues = Vector.Create(0.001, 0.008, 0.039, 0.041, 0.042);
// Apply Benjamini-Hochberg correction
var adjusted = MultipleTesting.Adjust(pValues, PValueAdjustmentMethod.BenjaminiHochberg);
// Or use a specific adjustment method directly
var holmAdjusted = MultipleTesting.AdjustHolm(pValues);
Methods
Adjust | Adjusts p-values using the Benjamini-Hochberg procedure. |
Adjust | Adjusts p-values using the Benjamini-Yekutieli procedure. |
Adjust | Adjusts p-values using the Bonferroni correction. |
Adjust | Adjusts p-values using the Hochberg correction. |
Adjust | Adjusts p-values using the Holm correction. |
Adjust | Adjusts p-values using the Holm-Sidak correction. |
Adjust | Adjusts p-values using the Hommel correction. |
Adjust | Adjusts p-values using the specified adjustment method. |
Adjust | Adjusts p-values using the Sidak correction. |
Get | Calculates the Bonferroni effective significance level. |
Get | Calculates the Sidak effective significance level. |