statsmodels.sandbox.stats.multicomp.set_remove_subs

statsmodels.sandbox.stats.multicomp.set_remove_subs(ssli)[source]

remove sets that are subsets of another set from a list of tuples

Parameters:
sslilist of tuples

each tuple is considered as a set

Returns:
partlist of tuples

new list with subset tuples removed, it is sorted by set-length of tuples. The list contains original tuples, duplicate elements are not removed.

Examples

>>> set_remove_subs([(0, 1), (1, 2), (1, 2, 3), (0,)])
[(1, 2, 3), (0, 1)]
>>> set_remove_subs([(0, 1), (1, 2), (1,1, 1, 2, 3), (0,)])
[(1, 1, 1, 2, 3), (0, 1)]