Skip to main content

hochberg_correction

Function hochberg_correction 

Source
pub fn hochberg_correction<T>(p_values: &[T]) -> Result<Vec<T>>
where T: FloatOps,
Expand description

Apply Hochberg’s step-up method for controlling family-wise error rate

Hochberg’s procedure is a step-up method that controls the family-wise error rate (FWER) and is more powerful than Holm’s procedure when all tests are independent.

§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::hochberg_correction(&p_values).unwrap();