You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TukeyHSD: No method to get group1 and group2 to match res.std_pairs #2762
I wanted to write a function to export the TukeyHSDResult to a CSV file, however there doesn't seem to be any rhyme or reason to the output from res.groups...
Using res.groupsunique I can calculate the combinations possible (e.g. for 6 groups I know there should be 15 unique combinations which corresponds to the len(res.std_pairs) as well as the summary output) but when I call res.groups I get a list of 52 strings, with each group label repeated several times. I would understand if it was double in length of the combinations, or even double in length plus the redundant A --> A (or A <-- A) comparisons, but even then I would expect the length of the list to be 42, not 52
What logic is producing the strange behavior of res.groups? Has anyone already come up with a function which I can use to produce a proper length list, e.g. of tuples like (group1_label, group2_label) ?
Activity
josef-pkt commentedon Jan 15, 2016
Do you or do we have an example that shows this?
how many observations do you have?
Maybe
groupscontain the labels for each observation.trevstanhope commentedon Jan 16, 2016
Here is the what I was working with for testing:
test.zip
josef-pkt commentedon Mar 5, 2016
It looks like the group pairs are never attached, i.e. go out of scope after creating summary table
here's the info from the summary table, first two columns
josef-pkt commentedon Mar 5, 2016
the simultaneous_ci function gets the information out of the attached
_multicompwhich has thepairindicesor fancy indexing
josef-pkt commentedon Jan 25, 2025
#9487 added group_t and group_c attributes with group names
see PR why I did not use group1 and group2