Skip to main content

parallel_permutation_test

Function parallel_permutation_test 

Source
pub fn parallel_permutation_test(
    group1: &[f64],
    group2: &[f64],
    n_permutations: usize,
    seed: Option<u64>,
) -> StatsResult<PermutationTestResult>
Expand description

Parallel permutation test for the difference in means between two groups.

Randomly permutes group labels and recomputes the test statistic to build a null distribution.

§Arguments

  • group1 - First group’s data
  • group2 - Second group’s data
  • n_permutations - Number of random permutations
  • seed - Optional random seed for reproducibility

§Returns

PermutationTestResult with observed statistic and p-value.