trevismd / statannotations

add statistical significance annotations on seaborn plots. Further development of statannot, with bugfixes, new features, and a different API.
Other
655 stars 73 forks source link

One-sided t-test #71

Open juuf opened 2 years ago

juuf commented 2 years ago

It would be great if one could set a dynamic tail for a one-sided t-test. I.e. instead of having a static value

annotator.apply_test(alternative='greater')

one could input an array determining which tail should be evaluated for which pair combination.

kuchaale commented 2 years ago

Related to #58.

trevismd commented 1 year ago

I think it can be done rather simply, maybe with something like

class Annotator:
    ...
    def apply_test(self, num_comparisons='auto', pairs_stats_params=None, **stats_params):

called with

# if there were two pairs 
pairs_stats_params = {'alternative': ['greater', 'less']}
annotator.apply_test(pairs_stats_params=pairs_stats_params, nan_policy='omit')

alternative would be distributed and nan_policy would still be used for each call.

(no conclusion for #58 yet)

Kang1121 commented 1 year ago

Looking forward to the update!