Apply multiple testing correction to a vector of p-values. Converts p-values to the appropriate numeric type and applies the specified correction method. All correction methods are implemented in the `single_statistics` crate with well-tested algorithms. # Arguments `p_value` - Raw p-values to correct `method` - Multiple testing correction method to apply # Returns Vector of corrected p-values
(p_value: &[T], method: CorrectionMethod)
| 981 | /// - **Hochberg**: Requires independence assumption |
| 982 | /// - **Storey Q-value**: Provides q-value estimates |
| 983 | fn apply_correction<T>(p_value: &[T], method: CorrectionMethod) -> anyhow::Result<Vec<T>> |
| 984 | where |
| 985 | T: FloatOps, |
| 986 | { |
| 987 | match method { |
| 988 | CorrectionMethod::Bonferroni => bonferroni_correction(p_value), |
| 989 | CorrectionMethod::BejaminiHochberg => benjamini_hochberg_correction(p_value), |
| 990 | CorrectionMethod::BenjaminiYekutieli => benjamini_yekutieli_correction(p_value), |
| 991 | CorrectionMethod::HolmBonferroni => holm_bonferroni_correction(p_value), |
| 992 | CorrectionMethod::Hochberg => hochberg_correction(p_value), |
| 993 | CorrectionMethod::StoreyQValue => storey_qvalues(p_value, T::from(0.5).unwrap()), |
| 994 | } |
| 995 | } |
| 996 | |
| 997 | #[allow(clippy::too_many_arguments)] |
| 998 | fn store_results( |
no outgoing calls
no test coverage detected