Add paired t-test greater and less than comparisons#85
Add paired t-test greater and less than comparisons#85Magnushhoie wants to merge 4 commits intotrevismd:devfrom
Conversation
trevismd
left a comment
There was a problem hiding this comment.
Hello @Magnushhoie ,
Thanks for the PR!
I guess it is convenient indeed to have these basic configurations included even though it is already possible to override the alternative parameter using stats_params.
Would you be willing to add basic tests ensuring their coverage in case something is updated later on (by us or scipy)?
statannotations/stats/StatTest.py
Outdated
|
|
||
| 't-test_paired-gt': StatTest(stats.ttest_rel, | ||
| 't-test paired samples', 't-test_rel', 't', | ||
| alternative="greater"), | ||
|
|
||
| 't-test_paired-ls': StatTest(stats.ttest_rel, | ||
| 't-test paired samples', 't-test_rel', 't', | ||
| alternative="less"), |
There was a problem hiding this comment.
Could you move these below the two-sided counterpart and fix the alignment of the 2nd and 3rd lines?
| IMPLEMENTED_TESTS = ['t-test_ind', 't-test_welch', | ||
| 't-test_paired', 't-test_paired-gt', 't-test_paired-ls', |
There was a problem hiding this comment.
| IMPLEMENTED_TESTS = ['t-test_ind', 't-test_welch', | |
| 't-test_paired', 't-test_paired-gt', 't-test_paired-ls', | |
| IMPLEMENTED_TESTS = ['t-test_ind', 't-test_welch', | |
| 't-test_paired', 't-test_paired-gt', 't-test_paired-ls', |
|
Oh, and perhaps it's worth doing that for independent samples as well, then? |
|
Hi Trevis, Sure, tried to add some basic tests for matching p-values. I am struggling to figure out how the TestStatTest tests in tests/test_annotation.py are actually run. I hope the logic will work like it does when I coded it manually. |
4923c63 to
8f148c1
Compare
Add t-test_paired-gt and t-test_paired-ls to StatTest. Currently only the two-sided alternative of paired t-test is available, while e.g. Mann-Whitney provides all three.
Follows the same naming scheme and passes automated tests and manual testing.