pyVHR.stats package

Submodules

pyVHR.stats.multi_dataset_analysis_SPLIT module

pyVHR.stats.nonparametric_tests module

pyVHR.stats.nonparametric_tests.binomial_sign_test(*args)

Performs a binomial sign test for two dependent samples. Tests the hypothesis that the two dependent samples represent two different populations.

sample1, sample2: array_like

The sample measurements for each group.

B-valuefloat

The computed B-value of the test.

p-valuefloat

The associated p-value from the B-distribution.

D.J. Sheskin, Handbook of parametric and nonparametric statistical procedures. crc Press, 2003, Test 19: The Binomial Sign Test for Two Dependent Samples

pyVHR.stats.nonparametric_tests.bonferroni_dunn_test(ranks, control=None)

Performs a Bonferroni-Dunn post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of the control method is different to each of the other methods.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

controlstring optional

The name of the control method (one vs all), default None (all vs all)

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

O.J. Dunn, Multiple comparisons among means, Journal of the American Statistical Association 56 (1961) 52–64.

pyVHR.stats.nonparametric_tests.finner_multitest(ranks)

Performs a Finner post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of each pair of groups are different.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

  1. Finner, On a monotonicity problem in step-down multiple test procedures, Journal of the American Statistical Association 88 (1993) 920–923.

pyVHR.stats.nonparametric_tests.finner_test(ranks, control=None)

Performs a Finner post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of the control method is different to each of the other methods.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

controlstring optional

The name of the control method, default the group with minimum ranking

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

  1. Finner, On a monotonicity problem in step-down multiple test procedures, Journal of the American Statistical Association 88 (1993) 920–923.

pyVHR.stats.nonparametric_tests.friedman_aligned_ranks_test(*args)

Performs a Friedman aligned ranks ranking test. Tests the hypothesis that in a set of k dependent samples groups (where k >= 2) at least two of the groups represent populations with different median values. The difference with a friedman test is that it uses the median of each group to construct the ranking, which is useful when the number of samples is low.

sample1, sample2, …array_like

The sample measurements for each group.

Chi2-valuefloat

The computed Chi2-value of the test.

p-valuefloat

The associated p-value from the Chi2-distribution.

rankingsarray_like

The ranking for each group.

pivotsarray_like

The pivotal quantities for each group.

J.L. Hodges, E.L. Lehmann, Ranks methods for combination of independent experiments in analysis of variance, Annals of Mathematical Statistics 33 (1962) 482–497.

pyVHR.stats.nonparametric_tests.friedman_test(*args)

Performs a Friedman ranking test. Tests the hypothesis that in a set of k dependent samples groups (where k >= 2) at least two of the groups represent populations with different median values.

sample1, sample2, …array_like

The sample measurements for each group.

F-valuefloat

The computed F-value of the test.

p-valuefloat

The associated p-value from the F-distribution.

rankingsarray_like

The ranking for each group.

pivotsarray_like

The pivotal quantities for each group.

M. Friedman, The use of ranks to avoid the assumption of normality implicit in the analysis of variance, Journal of the American Statistical Association 32 (1937) 674–701. D.J. Sheskin, Handbook of parametric and nonparametric statistical procedures. crc Press, 2003, Test 25: The Friedman Two-Way Analysis of Variance by Ranks

pyVHR.stats.nonparametric_tests.hochberg_multitest(ranks)

Performs a Hochberg post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of each pair of groups are different.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

  1. Hochberg, A sharper Bonferroni procedure for multiple tests of significance, Biometrika 75 (1988) 800–803.

pyVHR.stats.nonparametric_tests.hochberg_test(ranks, control=None)

Performs a Hochberg post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of the control method is different to each of the other methods.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

controlstring optional

The name of the control method, default the group with minimum ranking

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

  1. Hochberg, A sharper Bonferroni procedure for multiple tests of significance, Biometrika 75 (1988) 800–803.

pyVHR.stats.nonparametric_tests.holm_multitest(ranks)

Performs a Holm post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of each pair of groups are different.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

O.J. S. Holm, A simple sequentially rejective multiple test procedure, Scandinavian Journal of Statistics 6 (1979) 65–70.

pyVHR.stats.nonparametric_tests.holm_test(ranks, control=None)

Performs a Holm post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of the control method is different to each of the other methods.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

controlstring optional

The name of the control method (one vs all), default None (all vs all)

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

O.J. S. Holm, A simple sequentially rejective multiple test procedure, Scandinavian Journal of Statistics 6 (1979) 65–70.

pyVHR.stats.nonparametric_tests.li_test(ranks, control=None)

Performs a Li post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of the control method is different to each of the other methods.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

controlstring optional

The name of the control method, default the group with minimum ranking

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

  1. Li, A two-step rejection procedure for testing multiple hypotheses, Journal of Statistical Planning and Inference 138 (2008) 1521–1527.

pyVHR.stats.nonparametric_tests.nemenyi_multitest(ranks)

Performs a Nemenyi post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of each pair of groups are different.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

Bonferroni-Dunn: O.J. Dunn, Multiple comparisons among means, Journal of the American Statistical Association 56 (1961) 52–64.

pyVHR.stats.nonparametric_tests.quade_test(*args)

Performs a Quade ranking test. Tests the hypothesis that in a set of k dependent samples groups (where k >= 2) at least two of the groups represent populations with different median values. The difference with a friedman test is that it uses the median for each sample to wiehgt the ranking.

sample1, sample2, …array_like

The sample measurements for each group.

F-valuefloat

The computed F-value of the test.

p-valuefloat

The associated p-value from the F-distribution.

rankingsarray_like

The ranking for each group.

pivotsarray_like

The pivotal quantities for each group.

  1. Quade, Using weighted rankings in the analysis of complete blocks with additive block effects, Journal of the American Statistical Association 74 (1979) 680–683.

pyVHR.stats.nonparametric_tests.shaffer_multitest(ranks)

Performs a Shaffer post-hoc test using the pivot quantities obtained by a ranking test. Tests the hypothesis that the ranking of each pair of groups are different.

pivotsdictionary_like

A dictionary with format ‘groupname’:’pivotal quantity’

Comparionsarray-like

Strings identifier of each comparison with format ‘group_i vs group_j’

Z-valuesarray-like

The computed Z-value statistic for each comparison.

p-valuesarray-like

The associated p-value from the Z-distribution wich depends on the index of the comparison

Adjusted p-valuesarray-like

The associated adjusted p-values wich can be compared with a significance level

  1. Li, A two-step rejection procedure for testing multiple hypotheses, Journal of Statistical Planning and Inference 138 (2008) 1521–1527.

pyVHR.stats.single_dataset_analysis module

Module contents