Multiple Testing.Adjust Bonferroni Method
Adjusts p-values using the Bonferroni correction.
Definition
Namespace: Numerics.NET.Statistics.Tests
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.2
C#
A vector of adjusted p-values.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.2
public static Vector<double> AdjustBonferroni(
Vector<double> pValues
)
Parameters
Return Value
Vector<Double>A vector of adjusted p-values.
Remarks
This method multiplies each p-value by the number of tests to control the family-wise error rate. The resulting values are capped at 1.0 to ensure they remain valid probabilities.
It is valid for independent or positively correlated tests. Be cautious as it may be overly conservative for large numbers of tests, potentially leading to excessive Type II errors (false negatives).
For datasets with hundreds or thousands of tests, consider using a less conservative method such as Benjamini-Hochberg that controls the false discovery rate instead of the family-wise error rate.
Exceptions
Argument | pValues is null. |