scikit_posthocs.posthoc_conover(a: Union[list, ndarray, DataFrame], val_col: Optional[str] = None, group_col: Optional[str] = None, p_adjust: Optional[str] = None, sort: bool = True) DataFrame

Post hoc pairwise test for multiple comparisons of mean rank sums (Conover´s test). May be used after Kruskal-Wallis one-way analysis of variance by ranks to do pairwise comparisons 1.

  • a (array_like or pandas DataFrame object) – An array, any object exposing the array interface or a pandas DataFrame. Array must be two-dimensional. Second dimension may vary, i.e. groups may have different lengths.

  • 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.

  • 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)

  • sort (bool, optional) – Specifies whether to sort DataFrame by group_col or not. Recommended unless you sort your data manually.


result – P values.

Return type



A tie correction are employed according to Conover 1.



W. J. Conover and R. L. Iman (1979), On multiple-comparisons procedures, Tech. Rep. LA-7677-MS, Los Alamos Scientific Laboratory.


>>> x = [[1,2,3,5,1], [12,31,54, np.nan], [10,12,6,74,11]]
>>> sp.posthoc_conover(x, p_adjust = 'holm')