modewise_stats/lib.rs
1//! Group statistics on feature tables: GLM t with Freedman–Lane permutation, Welch's t, sign
2//! flipping for paired designs, FWER by the maximum statistic, FDR, and the network-based
3//! statistic (docs/statistics.md).
4
5mod dist;
6mod fdr;
7mod glm;
8mod nbs;
9mod permutation;
10
11pub use dist::{incomplete_beta, t_upper};
12pub use fdr::{Fdr, adjust};
13pub use glm::{Glm, welch_df, welch_t};
14pub use nbs::{Component, Edge};
15pub use permutation::{Exchange, PermutationTest, Statistic, Tail, TestResult};
16
17/// Components of suprathreshold edges, exposed for reference tests.
18#[doc(hidden)]
19pub fn components_for_test(
20 stat: &[f64],
21 edges: &[Option<Edge>],
22 threshold: f64,
23) -> Vec<(usize, Vec<usize>)> {
24 nbs::components(stat, edges, threshold)
25}