Given a dataset with two groups across time. We want to apply and annotate stats both independent (group1, time1) - (group1,time2) and paired (group1, time1) - (group1, time2)
From the examples it is not clear whether this can be done with one annotator?
statannotations.Annotator.Annotator has in its init a data and pair parameter, so the pairs need to be defined on initialization.
But apply/annotate, there we define the statistic.
So we need two Annotator instances and do like this?
annotator = Annotator(ax=ax, pairs=pairs_paired, plot="boxplot", data=data, x="condition", y="value", hue="group")
annotator.configure(test="t-test_paired") # within group, across time condition
annotator.apply_and_annotate()
annotator = Annotator(ax=ax, pairs=pairs_across_groups, plot="boxplot", data=data, x="condition", y="value", hue="group")
annotator.configure(test="t-test_ind")
annotator.apply_and_annotate()
However then the annotator instances do not know about each other and label can overlap, as shown below?
It could be fixed by forcing the stat across pairs (ttest-independent) to be on fixed y-value
#189
Given a dataset with two groups across time. We want to apply and annotate stats both independent (group1, time1) - (group1,time2) and paired (group1, time1) - (group1, time2)
From the examples it is not clear whether this can be done with one annotator?
statannotations.Annotator.Annotatorhas in its init adataandpairparameter, so the pairs need to be defined on initialization.But apply/annotate, there we define the statistic.
So we need two Annotator instances and do like this?
However then the annotator instances do not know about each other and label can overlap, as shown below?
It could be fixed by forcing the stat across pairs (ttest-independent) to be on fixed y-value
#189