recursively check all pairs of vals for minimum distance
step down method as in Newman-Keuls and Ryan procedures. This is not a closed procedure since not all partitions are checked.
Parameters : | vals : array_like
dcrit : array_like or float
|
---|---|
Returns : | rejs : list of pairs
nrejs : list of pairs
lli : list of tuples
res : tree
this follows description in SPSS notes on Post-Hoc Tests : Because of the recursive structure, some comparisons are made several : times, but only unique pairs or sets are returned. : |
Examples
>>> m = [0, 2, 2.5, 3, 6, 8, 9, 9.5,10 ]
>>> rej, nrej, ssli, res = homogeneous_subsets(m, 2)
>>> set_partition(ssli)
([(5, 6, 7, 8), (1, 2, 3), (4,)], [0])
>>> [np.array(m)[list(pp)] for pp in set_partition(ssli)[0]]
[array([ 8. , 9. , 9.5, 10. ]), array([ 2. , 2.5, 3. ]), array([ 6.])]