Repository navigation
Conversation
Jiangtang
commented
Sep 26, 2016
- add 2 methods with continuity correction (CC) for Normal and Wilson methods respectively;
- add the paper of Newcombe on single proportion which is the mostly sited paper on this topic.
- cosmetic changes.
add 2 methods with continuity correction (CC) for Normal and Wilson methods respectively; add paper of Newcombe; cosmetic changes.
josef-pkt
left a comment
There was a problem hiding this comment.
@Jiangtang Thanks and sorry for the delay in responding
based on a brief review:
overall looks like a good extension
this need unit tests, preferably against R or another stats package
I don't really like the code duplication in the two new methods. The calculations for wilson look different but I didn't try to figure it out. I think we could just use something like method.endswith('_cc') and then add the continuity correction to the current methods.
and replace the current condition with method.startswith or similar.
| ci_low = q_ - dist | ||
| ci_upp = q_ + dist | ||
|
|
||
| if method == 'normal_cc': |
There was a problem hiding this comment.
this should be elif unit tests on travis fail because of it.
| - `beta` : Clopper-Pearson interval based on Beta distribution | ||
| - `beta` : Clopper-Pearson interval based on Beta distribution, or Exact method | ||
| - `wilson` : Wilson Score interval | ||
| - `wilson_cc` : Wilson Score interval with continuity correction |
There was a problem hiding this comment.
I think API with separate methods is fine. The alternative of adding a "continuity correction" keyword wouldn't apply generally enough.
|
bump for 0.15, together with some proportion refactorings #6721 |
|
unit tests are missing |