scikit_posthocs.posthoc_vanwaerden(a: list | ndarray | DataFrame, val_col: str = None, group_col: str = None, sort: bool = False, p_adjust: str = None) DataFrame

Van der Waerden’s test for pairwise multiple comparisons between group levels. See references for additional information [1], [2].

  • a (array_like or pandas DataFrame object) – An array, any object exposing the array interface or a pandas DataFrame.

  • val_col (str, optional) – Name of a DataFrame column that contains dependent variable values (test or response variable). Values should have a non-nominal scale. Must be specified if a is a pandas DataFrame object.

  • group_col (str, optional) – Name of a DataFrame column that contains independent variable values (grouping or predictor variable). Values should have a nominal scale (categorical). Must be specified if a is a pandas DataFrame object.

  • sort (bool, optional) – If True, sort data by block and group columns.

  • p_adjust (str, optional) – Method for adjusting p values. See statsmodels.sandbox.stats.multicomp for details. Available methods are: ‘bonferroni’ : one-step correction ‘sidak’ : one-step correction ‘holm-sidak’ : step-down method using Sidak adjustments ‘holm’ : step-down method using Bonferroni adjustments ‘simes-hochberg’ : step-up method (independent) ‘hommel’ : closed method based on Simes tests (non-negative) ‘fdr_bh’ : Benjamini/Hochberg (non-negative) ‘fdr_by’ : Benjamini/Yekutieli (negative) ‘fdr_tsbh’ : two stage fdr correction (non-negative) ‘fdr_tsbky’ : two stage fdr correction (non-negative)


result – P values.

Return type:



For one-factorial designs with samples that do not meet the assumptions for one-way-ANOVA and subsequent post hoc tests, the van der Waerden test using normal scores can be employed. Provided that significant differences were detected by this global test, one may be interested in applying post hoc tests according to van der Waerden for pairwise multiple comparisons of the group levels.

There is no tie correction applied in this function.



>>> x = np.array([[10,'a'], [59,'a'], [76,'b'], [10, 'b']])
>>> sp.posthoc_vanwaerden(x, val_col = 0, group_col = 1)