Repository navigation
ENH: add prob(x1 > x2) effect size measure, inference based on brunner munzel - #6971
Conversation
|
Hello @josef-pkt! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-09-01 15:52:52 UTC |
|
This pull request introduces 1 alert when merging 9e64ae0 into 1c82e3a - view on LGTM.com new alerts:
|
9e64ae0 to
1cbcdfb
Compare
|
This pull request introduces 1 alert when merging 1cbcdfb into b6af426 - view on LGTM.com new alerts:
|
1cbcdfb to
278f497
Compare
|
We reverse the direction compared to brunnermunzel and followup literature, we compute prob x1 > x2, instead of prob x1 < x2. But we want larger is better as in most other fields. Some signs in unit tests need to be reversed to match numbers, e.g. interchange x1, x2. |
|
currently still a hybrid that implements hypothesis test twice, once in main function for brunnermunzel and once as method in the results class. The main function is based on mean rank differences and not on p directly. (they are just transformation of each other for p=0.5 null) The function returns a HolderTuple, so brunnermunzel statistic and p-value are immediately available. |
|
refactoring and dropping the scipy alternative version causes test failure. neither scipy nor lawstat say what "less" means. my guess is that the are mixing up prob(x less y) with the "less" in the alternative. my version in the results method just uses my generic test and confint code. aside: lawstat prints the two-sided confint even if alternative is one-sided in r: compare with R t.test, reversed variables, so we get a positive test statistic |
|
cross checking with Welch t-test on ranks: in large samples results are essentially identical to brunner-munzerl |
|
corner case, full separation, all x2 > x1, prob1=0, prob2=1 ttest on ranks still works in this case ? |
|
a quick MC nobs1=nobs2 = 100 size at 5% alpha: reducing nobs1, nobs2 to 10, with 20000 MC replications |
|
one travis failure in statespace, everything else is green hypothesis test methods still return tuple instead of HolderTuple missing bonus: should I add also prob2, i.e. p(x2 > x1) to summary? I'm skipping power and sample size computation for now |
|
this vectorized with little work example from UCLA stats, reading and writing skills of female versus male highschool students still a bug in summary, confint is transposed |
|
edit this example and the following has male and female reversed, female is coded as 1 original comment: In this sample the only significant result is that boys have higher writing grades than girls. |
|
aside: I'm fixing Holder str and repr for nested cases as in tost, add an intend of 4 spaces. new results for repr |
|
all green, full unit test coverage except when raising ValueError |
edb9436 to
ee32b0b
Compare
0c3caa5 to
b83da98
Compare
|
added to docs stats.rst but not to stats.api see #7013 merging when green enough |
b83da98 to
c33d27c
Compare
see #6960 stochastically larger, with notes and references leading to this PR
and #3575 brunner-munzel test
includes
location: new module stats.nonparametric