Coverage for /home/martinb/.local/share/virtualenvs/camcops/lib/python3.6/site-packages/statsmodels/stats/multicomp.py : 80%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- coding: utf-8 -*-
2"""
4Created on Fri Mar 30 18:27:25 2012
5Author: Josef Perktold
6"""
8from statsmodels.sandbox.stats.multicomp import ( # noqa:F401
9 tukeyhsd, MultiComparison)
11__all__ = ['tukeyhsd', 'MultiComparison']
14def pairwise_tukeyhsd(endog, groups, alpha=0.05):
15 """
16 Calculate all pairwise comparisons with TukeyHSD confidence intervals
18 Parameters
19 ----------
20 endog : ndarray, float, 1d
21 response variable
22 groups : ndarray, 1d
23 array with groups, can be string or integers
24 alpha : float
25 significance level for the test
27 Returns
28 -------
29 results : TukeyHSDResults instance
30 A results class containing relevant data and some post-hoc
31 calculations, including adjusted p-value
33 Notes
34 -----
35 This is just a wrapper around tukeyhsd method of MultiComparison
37 See Also
38 --------
39 MultiComparison
40 tukeyhsd
41 statsmodels.sandbox.stats.multicomp.TukeyHSDResults
42 """
44 return MultiComparison(endog, groups).tukeyhsd(alpha=alpha)