/usr/share/pyshared/statsmodels/stats/multicomp.py is in python-statsmodels 0.4.2-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 30 18:27:25 2012
Author: Josef Perktold
"""
from statsmodels.sandbox.stats.multicomp import tukeyhsd, MultiComparison
def pairwise_tukeyhsd(endog, groups, alpha=0.05):
'''calculate all pairwise comparisons with TukeyHSD confidence intervals
this is just a wrapper around tukeyhsd method of MultiComparison
Parameters
----------
endog : ndarray, float, 1d
response variable
groups : ndarray, 1d
array with groups, can be string or integers
alpha : float
significance level for the test
Returns
-------
table : SimpleTable instance
table for printing
tukeyhsd_res : list
contains detailed results from tukeyhsd function
[(idx1, idx2), reject, meandiffs, std_pairs, confint, q_crit,
df_total, reject2]
See Also
--------
MultiComparison
tukeyhsd
'''
return MultiComparison(endog, groups).tukeyhsd(alpha=alpha)
|