def test_apply_test_with_correction(self): self.assertAlmostEqual( 1.0, apply_test(self.x, self.y, "Mann-Whitney", "bonferroni", num_comparisons=2).pvalue)
def _get_stat_result_from_test(self, group_struct1, group_struct2, num_comparisons, **stats_params) -> StatResult: result = apply_test(group_struct1['group_data'], group_struct2['group_data'], self.test, comparisons_correction=self.comparisons_correction, num_comparisons=num_comparisons, alpha=self.alpha, **stats_params) return result
def test_apply_test_with_test(self): test = StatTest.from_library("Mann-Whitney") self.assertAlmostEqual( mwu(self.x, self.y, alternative="two-sided")[1], apply_test(self.x, self.y, test).pvalue)
def test_apply_test_without_test(self): res = apply_test(self.x, self.y, None, "BH") self.assertIs(np.nan, res.pvalue)
def test_apply_test_with_correction_from_library(self): apply_test(self.x, self.y, "Mann-Whitney", "BH")
def test_apply_test_from_library(self): apply_test(self.x, self.y, "Mann-Whitney")