6.8.5.2.25. 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:

ssli : list of tuples

each tuple is considered as a set

Returns:

part : list 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)]