scikit_posthocs.test_mackwolfe(data: Union[List, ndarray, DataFrame], val_col: Optional[str] = None, group_col: Optional[str] = None, p: Optional[int] = None, n_perm: int = 100, sort: bool = False) Tuple[float, float]

Mack-Wolfe Test for Umbrella Alternatives.

In dose-finding studies one may assume an increasing treatment effect with increasing dose level. However, the test subject may actually succumb to toxic effects at high doses, which leads to decresing treatment effects 1, 2.

The scope of the Mack-Wolfe Test is to test for umbrella alternatives for either a known or unknown point P (i.e. dose-level), where the peak (umbrella point) is present.

  • data (Union[List, numpy.ndarray, DataFrame]) – An array, any object exposing the array interface or a pandas DataFrame with data values.

  • val_col (str = None) – 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 = None) – 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 (int = None) – The a priori known peak as an ordinal number of the treatment group including the zero dose level, i.e. p = {0, …, k-1}. Defaults to None.

  • n_perm (int = 100) – Permutations number.

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


P value and statistic.

Return type

Tuple[float, float]



Chen, I.Y. (1991) Notes on the Mack-Wolfe and Chen-Wolfe Tests for Umbrella Alternatives. Biom. J., 33, 281-290.


Mack, G.A., Wolfe, D. A. (1981) K-sample rank tests for umbrella alternatives. J. Amer. Statist. Assoc., 76, 175-181.


>>> x = [[22, 23, 35], [60, 59, 54], [98, 78, 50], [60, 82, 59], [22, 44, 33], [23, 21, 25]]
>>> sp.posthoc_mackwolfe(x)