pub fn bonferroni_correction<T>(p_values: &[T]) -> Result<Vec<T>>where
T: FloatOps,Expand description
Apply Bonferroni correction to p-values
Bonferroni correction is a simple but conservative method that multiplies each p-value by the number of tests.
§Arguments
p_values- A slice of p-values to adjust
§Returns
Result<Vec<f64>>- Vector of adjusted p-values
§Example
let p_values = vec![0.01, 0.03, 0.05];
let adjusted = single_statistics::testing::correction::bonferroni_correction(&p_values).unwrap();